Link to home
Start Free TrialLog in
Avatar of Roman F
Roman FFlag for United States of America

asked on

how to format one of my field to percent with precision of two?

results of the query:





MM      YY              Total      No Profile      ErrorRate      Accuracy
1      2017      109              1                     0.92%             99.9908256880734
2      2017      202              0                     0.00%            100


i have a problem with Accuracy:
how to format to the precision of 2, should be 99.99 and 100.00

Format(100-[CountTrue]/[CountAll])

SELECT
Month([ReportingDate]) AS MM,
Year([ReportingDate]) AS YY,
Sum(tblStat.CountAll) AS Total, tblStat.CountTrue AS [No Profile],
Format([CountTrue]/[CountAll],"Percent") AS ErrorRate, Format(100-[CountTrue]/[CountAll]) AS Accuracy
FROM tblStat
GROUP BY Month([ReportingDate]), Year([ReportingDate]), tblStat.CountTrue, Format([CountTrue]/[CountAll],"Percent"), Format(100-[CountTrue]/[CountAll])
HAVING (((Year([ReportingDate]))=2017) AND ((tblStat.CountTrue) Is Not Null));
test.accdb
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roman F

ASKER

thank you guys