Hello!
I have been trying to solve the above problem and I think I have a solution, I just can not seem to have the code work.
What I am thinking of doing is adding 2 new columns. The first new column would count the number of actual results and be called "Actual". The second column would divide "Pet" by "Actual" and multiple by 100 and be called "percentage".
Code:
SELECT "dog" AS Pet, Count(*) AS Actual, Count(*) AS CountPet FROM tablename WHERE ((tablename.dog)=True), (Count([CountPet])/[Actual])*100 As Percentage
UNION SELECT "cat", Count(*), Count(*) FROM tablename WHERE ((tablename.cat)=True), (Count([CountPet])/[Actual])*100
UNION SELECT "fish", Count(*), Count(*) FROM tablename WHERE ((tablename.fish)=True), (Count([CountPet])/[Actual])*100;
This way, I can then graph the percentage column. Any ideas on what the problem is? I think it has to do with using more then one count, but I am not sure.
Thank you for any guidance that you could provide.