The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I can't seem to recreate a formula from excel into DAX. I need a percent complete like =a1/a2*100. Anyone have any ideas?
Solved! Go to Solution.
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
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!
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |