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
ERing
Post Partisan
Post Partisan

Help with simple Division Measure producing incorrect result

I have a simple dashboard where I'm trying to calculate the delta between my Sessions_Clicks_% and my Sessions_Clicks_%_Baseline. 

The Sessions_Clicks_%_Delta should be =  (Sessions_Clicks_% - Sessions_Clicks_%_Baseline)/(Sessions_Clicks_%_Baseline)

 

Sessions_Clicks_% = 'Sheet1'[SUM_Web_Clicks]/'Sheet1'[SUM_Web_Sessions]


Sessions_Clicks_%_Baseline = 
CALCULATE(
    'Sheet1'[Sessions_Clicks_%],
    FILTER(
        ALL ('Calendar'),
        'Calendar'[Year] = 2025
        && MONTH ('Calendar'[Date]) IN {1}
    )
)


Sessions_Clicks_%_Delta = ('Sheet1'[Sessions_Clicks_%]-'Sheet1'[Sessions_Clicks_%_Baseline])/'Sheet1'[Sessions_Clicks_%_Baseline]

 

For some reason Sessions_Clicks_%_Delta is off slightly. I've exported the data from the table visual and calculated the expected result in Excel.

My sample file is attached. 

https://www.dropbox.com/scl/fi/lxx69klap36wnx0op8dwf/Division-Example.pbix?rlkey=jm2l1lieeqjddulwrcf...

Screenshot 2025-03-28 180402.png

 

Screenshot 2025-03-28 180545.png

2 ACCEPTED SOLUTIONS
ERing
Post Partisan
Post Partisan

@lbendlin @Ashish_Mathur 

I have determined the issue is due to rounding and the number of decimal places. As you can see below, Ive taken two seperate table exports from the same Power BI table. In the first export I had the measures in PBI formatted to two decimal places. This results in slightly inccorrect results as you can see in column J (comparing the PBI measure in column H with the same Excel calculation in column I). In the second export I had the measures in PBI formatted to four decimal places and the results are correct (column J shows zero difference when comparing columns H & I). 

The math is correct when using four decimal places. When displaying two decimal places, the values in column F & H are rounded, however the calculation in column H is done with four decimal places in columns F & G.

 

 

Two Decimals.png

Four Decimals.png

View solution in original post

Power BI takes into consideration the decimal places that are not visible so simply taking an export (which exports just what is visible in the visual) can result to a misleading calculation in Excel.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

9 REPLIES 9
v-echaithra
Community Support
Community Support

Hi @ERing ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

Chaithra E.

 

v-echaithra
Community Support
Community Support

Hi @ERing ,

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

Chaithra E.

v-echaithra
Community Support
Community Support

Hi @ERing ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

Chaithra E.

ERing
Post Partisan
Post Partisan

@lbendlin @Ashish_Mathur 

I have determined the issue is due to rounding and the number of decimal places. As you can see below, Ive taken two seperate table exports from the same Power BI table. In the first export I had the measures in PBI formatted to two decimal places. This results in slightly inccorrect results as you can see in column J (comparing the PBI measure in column H with the same Excel calculation in column I). In the second export I had the measures in PBI formatted to four decimal places and the results are correct (column J shows zero difference when comparing columns H & I). 

The math is correct when using four decimal places. When displaying two decimal places, the values in column F & H are rounded, however the calculation in column H is done with four decimal places in columns F & G.

 

 

Two Decimals.png

Four Decimals.png

Power BI takes into consideration the decimal places that are not visible so simply taking an export (which exports just what is visible in the visual) can result to a misleading calculation in Excel.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ashish_Mathur
Super User
Super User

Hi,

Those numbers are correct.  Have made some changs to the file.

Ashish_Mathur_0-1743227256272.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Your numbers are accurate, the expectations are wrong.

Please use DIVIDE for divisions, and use variables. 

Try not to nest measures too much as each of them comes with an implicit CALCULATE.

You also were using the wrong date field and not marking the calendar as Date table.

 

Attached a cleaned up version.

I don't understand how the expectations are wrong. I took an export from the file you provided and you can see that the calculation in column I produces slightly different results from the Power BI measure result in column H. It's very close, but if a user were to do the calcuation, they will find a different result from the Power BI measure result. 

Screenshot 2025-03-29 013317.png

You are calculating percentage differences of two percentages, not of regular values.

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.