Forum Discussion
Anonymous
5 years agoNot applicable
% Diff by Category
Hello, I am a novice at DAX and am looking for help on create a percent diff measure based on category. Here's the raw data System RunTime A 5 B 7 Here's what I am like ...
- Anonymous5 years ago
Hi Anonymous ,
First, Transform data>>Transform>>Transpose>>use first row as headers
Then create a measure.
%diff = SELECTEDVALUE('Table'[A])/SELECTEDVALUE('Table'[B])If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards
Community Support Team _ Polly
MFelix
Super User
5 years agoHi Anonymous
Try the following
% difference =
DIVIDE (
CALCULATE ( SUM ( Table[Runtime] ), Table[System] = "A" ),
CALCULATE ( SUM ( Table[Runtime] ), Table[System] = "B" )
)
Be aware that if you want a dinamic approach this needs to be changed and the values of each of the system need to be a formula also.