Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
I have a calculated column where it returns "true" if the budget column is below budget. I am trying to understand the % of projects (rows) that are under budget compared to the total amount of rows.
How do I add up only the "true" rows in a column, so that I can divide by the total number of rows? this would give me the % of projects under budget vs total projects.
I did this formula, but I don't believe it is accounting for only the "true" results
Count of On_UnderBudget divided by Count of Store Number =
DIVIDE(
COUNTA('CML-Filtered'[On_UnderBudget]),
COUNTA('CML-Filtered'[Key])
))
Solved! Go to Solution.
Hey,
give this a try it should do what you're after:
Count of On_UnderBudget divided by Count of Store Number =
divide(
calculate(counta('CML-Filtered'[Key]),'CML-Filtered'[On_UnderBudget] ="true"),
calculate(counta('CML-Filtered'[Key]))
)
You can count the true/False using countrows.
CALCULATE(COUNTROWS(Table1),Table1[True_False_Col]=TRUE())
Thanks
Raj
Hey,
give this a try it should do what you're after:
Count of On_UnderBudget divided by Count of Store Number =
divide(
calculate(counta('CML-Filtered'[Key]),'CML-Filtered'[On_UnderBudget] ="true"),
calculate(counta('CML-Filtered'[Key]))
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |