Forum Discussion
I need a % Complete expression!
- 7 years ago
Hi, can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data?
Column1 Column2 Column3 A 1.5 6 B 2.5 4 As described here:
How to Get Your Question Answered Quickly
In general you could just do a measure with DIVIDE (as it handles the DIV/0), based on the table I posted it would look like:
Ratio = DIVIDE(SUM('Table'[Column2]), SUM('Table'[Column3]))for A in rows it will return 0.25, for B it will return 0.625, and for total 0.4
you can then either multiply it by 100 or format as percent so it would be displayed as 25.0%, 62.5% and 40% respectively
Hi, can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data?
| Column1 | Column2 | Column3 |
| A | 1.5 | 6 |
| B | 2.5 | 4 |
As described here:
How to Get Your Question Answered Quickly
In general you could just do a measure with DIVIDE (as it handles the DIV/0), based on the table I posted it would look like:
Ratio = DIVIDE(SUM('Table'[Column2]), SUM('Table'[Column3]))
for A in rows it will return 0.25, for B it will return 0.625, and for total 0.4
you can then either multiply it by 100 or format as percent so it would be displayed as 25.0%, 62.5% and 40% respectively
- Queen_Geek7 years ago
Helper I
Thank you for getting back to me so quickly. I finally got it last night! :) I used the exact expression you suggested.
Also, thank you for pointers on asking questions!