Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
randyrettig
Helper I
Helper I

Why does this measure work?

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?

2 ACCEPTED SOLUTIONS
rajendraongole1
Super User
Super User

Hi @randyrettig  - your measure should be as below:

 

%measure = DIVIDE([past due],([on time] + [past due]))
 

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

 

 

rajendraongole1_0-1717424667650.png

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

MFelix
Super User
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


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
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


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



rajendraongole1
Super User
Super User

Hi @randyrettig  - your measure should be as below:

 

%measure = DIVIDE([past due],([on time] + [past due]))
 

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

 

 

rajendraongole1_0-1717424667650.png

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.