Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all,
I have an excel formula that I am hoping to have replicated into DAX format for a measure I have created. I'm pretty new to Power BI so looking for some help if possible 😬
The excel formula is: =IFERROR(1-([@exceptiondurationmins]/[@adherenceschedulemins]),0%)
I have created 2 measures In Power BI:
Solved! Go to Solution.
Hi @Auski
Without seeing your data I'm having some trouble understanding if you want a single value for the calculation, or if you are trying to work out percentages for many rows of data?
Going with just a single calculation, you can try
Percentage = DIVIDE( SUM(adherence[exceptiondurationsecs]), SUM(adherence[adherenceschedulesecs]) )
If you are certain that will result in a number less than 1 then it's easy to do this
Percentage = 1 - DIVIDE( SUM(adherence[exceptiondurationsecs]), SUM(adherence[adherenceschedulesecs]) )
which will give you a value between 0 and 1. You can then format that value as a % by clicking on the measure under the Fields and then from the menu click on % or select Percentage from the drop down in the Formatting section
regards
Phil
Proud to be a Super User!
Thank you so much @PhilipTreacy, that worked perfectly. I combined your DAX statement with an IF statement to give me the exact output needed.
Legend!
Hi @Auski
Without seeing your data I'm having some trouble understanding if you want a single value for the calculation, or if you are trying to work out percentages for many rows of data?
Going with just a single calculation, you can try
Percentage = DIVIDE( SUM(adherence[exceptiondurationsecs]), SUM(adherence[adherenceschedulesecs]) )
If you are certain that will result in a number less than 1 then it's easy to do this
Percentage = 1 - DIVIDE( SUM(adherence[exceptiondurationsecs]), SUM(adherence[adherenceschedulesecs]) )
which will give you a value between 0 and 1. You can then format that value as a % by clicking on the measure under the Fields and then from the menu click on % or select Percentage from the drop down in the Formatting section
regards
Phil
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
89 | |
87 | |
77 | |
69 | |
68 |
User | Count |
---|---|
222 | |
128 | |
117 | |
82 | |
77 |