Forum Discussion
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
Hi,
Try this measure
=SUM([On Hand Bal])/((SUM([On Hand Bal])+SUM([safety stock]))/2)
6 Replies
- tex628Community 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())
- Snowy34Helper III
Good day Tax628
The issue with this is it still is wrong,
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.
- Ashish_MathurSuper User
Hi,
How did you calculate 39.52% The numerator is 66. What is the denominator?
- AnonymousNot applicable
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] ) / 2VAR _percentdiff = (_absolutedifference / _averagebetween) * 1RETURN_percentdiff