Forum Discussion
Difference between 2 bars
- 3 years ago
itsmeanuj My guy. You just take the Diff measure and break it into 3 measures, one for each difference value. PBIX is attached below signature.
IP Diff = VAR __Axis = MAX('Versions'[Version]) VAR __Result = SWITCH(__Axis, "IP Diff", VAR __1 = SUMX(FILTER('Table',[Versions] = "IP"),[Value]) VAR __2 = SUMX(FILTER('Table',[Versions] = "FC1"),[Value]) VAR __Result = IF(__1 < __2, __2 - __1, __1 - __2) RETURN __Result, BLANK() ) RETURN __Result FC1 Diff = VAR __Axis = MAX('Versions'[Version]) VAR __Result = SWITCH(__Axis, "FC1 Diff", VAR __1 = SUMX(FILTER('Table',[Versions] = "FC1"),[Value]) VAR __2 = SUMX(FILTER('Table',[Versions] = "FC2"),[Value]) VAR __Result = IF(__1 < __2, __2 - __1, __1 - __2) RETURN __Result, BLANK() ) RETURN __Result FC2 Diff = VAR __Axis = MAX('Versions'[Version]) VAR __Result = SWITCH(__Axis, "FC2 Diff", VAR __1 = SUMX(FILTER('Table',[Versions] = "FC2"),[Value]) VAR __2 = SUMX(FILTER('Table',[Versions] = "FC3"),[Value]) VAR __Result = IF(__1 < __2, __2 - __1, __1 - __2) RETURN __Result, BLANK() ) RETURN __Result
Thank you Greg_Deckler . This is helpful. But if you see the sample visual i shared, I am actually looking for differences in IP, FC1, FC2, FC3.
itsmeanuj That's great but you didn't provide sample data that included different Versions.
- itsmeanuj3 years agoHelper IV
Greg_Deckler - Actually i have uploaded it on the google drive and share the link in my original post. Here is the link?
- Greg_Deckler3 years agoCommunity Champion
itsmeanuj Updated PBIX attached below signature.
- itsmeanuj3 years agoHelper IV
Thank you so much Greg_Deckler - this worked. Is there a way we can change the colors of the Bars IP, FC1, FC2, and FC3 instead of having just 1 color for them?
- Greg_Deckler3 years agoCommunity Champion
itsmeanuj Missed that link, let me take a look. But, I mean, it's the same exact technique you just have to adjust the category is all. Instead of Month use Version.