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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pcowman
Helper I
Helper I

ON ADD COLUMN: DIVIDE() function with two columns yields wrong result?

Hi,

I've looked into the queries on the boards but don't see a solution for my specific problem.

 

I have two fields which I need to divide. I have created sum measures for these fields but the divide function is still giving me an incorrect result. I tried changing it to Field/Field and still I get the same result. I saw in someone else's post that changing to measures corrected the row level problem but it isn't for me. It did get rid of infinity results and the result showing as 100,200 or more.

 

grossmargin.PNG

Estimated GM% = DIVIDE([Sum Planned]-[Sum Est Cost],[Sum Planned],0)

1 ACCEPTED SOLUTION
jthomson
Solution Sage
Solution Sage

That Estimated GM% column in your visual (the one on the right without the space) looks to be giving the correct results based on your DAX, it's just not formatted as a percentage?

View solution in original post

2 REPLIES 2
jthomson
Solution Sage
Solution Sage

That Estimated GM% column in your visual (the one on the right without the space) looks to be giving the correct results based on your DAX, it's just not formatted as a percentage?

Crap you're right. Thanks. I did that several times and kept coming up with 85% not 92. just did it again and came out with 92. *bangs head*

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.