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
Snowy34
Helper III
Helper III

Percentage difference between two columns

Good evening all, 

 

I'm trying to get percentage difference between two columns and I'm having some issues with it

 

my table is, (FYI the table code have duplicated skus)

 

Item             On Hand Bal       safety stock

PRI202W      100                     50

ABS123         50                       100

appreciate any help with this,

 

Regards 

Snowy

1 ACCEPTED SOLUTION

Hi,

Try this measure

=SUM([On Hand Bal])/((SUM([On Hand Bal])+SUM([safety stock]))/2)


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

View solution in original post

6 REPLIES 6
texmexdragon2
Helper V
Helper V

This might be helpful also to anyone looking for this.   I used variables (following along with the math provided by the same website the above poster referenced).   Everything matched up.   

% Diff Pow vs Non Pow RMAs =
VAR _absolutedifference =  [Power Sup count] - [Non Power Sup Count]
VAR _averagebetween = ([Non Power Sup Count] + [Power Sup count] ) / 2
VAR _percentdiff = (_absolutedifference / _averagebetween) * 1
RETURN
_percentdiff
tex628
Community Champion
Community Champion

This very much depends on what you want to show. But generally speaking you would make a measure dividing the sum of one with the sum of the other.

Measure = DIVIDE(SUM([On Hand Bal]) , SUM([safety stock]) , BLANK()) 

 

 


Connect on LinkedIn

Good day Tax628

 

The issue with this is it still is wrong,

78bi8xS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As the first line % dif between 134 and 200 is 39.52%, not 67% I'm not sure where that 67% is getting pulled from.

 

Hi,

How did you calculate 39.52%  The numerator is 66.  What is the denominator?


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

As per below

 

EKMEY47

 

So I have used a pie chart and it worked fine but when done in a table as per below its showing 67%, I wanna get away from using the BOM filter on the side as I got more than one visual on the screen. Thx for your help.

kkAjOus

 

 

 

Hi,

Try this measure

=SUM([On Hand Bal])/((SUM([On Hand Bal])+SUM([safety stock]))/2)


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

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.