Error on IIF

Hi Mark,

Yes I understand now, even though it was showing 1 and 0 they were text rather than numbers. I actually changed the table values from Yes/No to numbers which was the easiest thing for me.

Thanks for the advice!
 
Adamfm,

Are you actually looking for the percentage failed or the ratio or fail to success?

Percentage failed would be failed/success+failed. This means if you have 20 failed and 80 success, you'd have a total of 100 and your percentage would be 20%. Ratio would be 20 to 80 or 25%.
 
if you are using Grouped by query, use this as "Expression"
Code:
PercentageFail: Sum(IIf([successful]=0,1,0))/Sum(1)*100

PercentageSuccess: Sum(IIf([successful],1,0))/Sum(1)*100
 

Users who are viewing this thread

Back
Top Bottom