Forum Discussion
elponce
8 years agoFrequent Visitor
Building a Percentage Table in Power BI
Hello! I have the columns below (first Table) that I am trying to use to calculate a percentage of items completed "On-Time" per month and year by using the formula: # Items On-Time/ (# Items "On...
- 8 years ago
Hey,
I would create a measure like so (please be aware that it is not tested, because I didn't recreate a table from your example):
Compliance = CALCULATE( count('table'[eventid]) ,'table'[status] = "On-time" ) / CALCULATE( count('table'[eventid]), ALL('table'[status]) )Hopefully this provides the solution you are looking for.
Regards
Tom
TomMartens
Super User
8 years agoHey,
I would create a measure like so (please be aware that it is not tested, because I didn't recreate a table from your example):
Compliance =
CALCULATE(
count('table'[eventid])
,'table'[status] = "On-time"
)
/
CALCULATE(
count('table'[eventid]),
ALL('table'[status])
)Hopefully this provides the solution you are looking for.
Regards
Tom
elponce
8 years agoFrequent Visitor
Thank you for your help! This works!