Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I have a measure to calculate the percentage of two other measures, and it does work, I just don't know why it works.
On Time = 149
Past Due = 1
I want the % of past due, so on a calculator I divide 149 by 1 and multiply x 100 and I get 0.67 which is great. If I do that in DAX, I get 0.01, which isn't great. That is just using a measure called Total = [past due] / [on time]. I'm just replicating what I do on a calculator and it doesn't work.
Now if I do this measure, I get the correct number - 0.67.
Total = [past due] / ([on time] + [past due]). I don't know why this works. Any ideas?
Solved! Go to Solution.
Hi @randyrettig - your measure should be as below:
This divides the past due count by the total count (on time + past due).
I tested with sample i got it 0.01 after that you have to multiple with 100 . When you format this as a percentage, it becomes 0.67%, which matches your expected result
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @randyrettig ,
Not sure if I got the essence of your error but looking at the measures you present both of them present the same value that is 0.01 (if rounded to 2 decimals) but be aware that since your values are very smal the measure look the same but they are not:
1/ 149 = 0.006711409
1 / (149 + 1) = 0.0066666
Believe that your problem is the lack of formatting has percentage this will give you the multiplication by 100 without writing it on the formula.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @randyrettig ,
Not sure if I got the essence of your error but looking at the measures you present both of them present the same value that is 0.01 (if rounded to 2 decimals) but be aware that since your values are very smal the measure look the same but they are not:
1/ 149 = 0.006711409
1 / (149 + 1) = 0.0066666
Believe that your problem is the lack of formatting has percentage this will give you the multiplication by 100 without writing it on the formula.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @randyrettig - your measure should be as below:
This divides the past due count by the total count (on time + past due).
I tested with sample i got it 0.01 after that you have to multiple with 100 . When you format this as a percentage, it becomes 0.67%, which matches your expected result
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |