Forum Discussion
mbylicki
5 years agoFrequent Visitor
Compare Data based on 2 selected values in 1 column
Hi, we're currently switching from Qlik into Power BI, and we're facing with such problem. We load several files into one table (simple example below) What we want to achieve is to ...
Anonymous
5 years agoNot applicable
Hi mbylicki ,
Here are the steps you can follow:
1. Create measure.
compara =
var _max = MAX('Table'[File name])
var _min = MIN('Table'[File name])
return CALCULATE(SUM('Table'[Sell]),ALLEXCEPT('Table','Table'[Client]),FILTER('Table','Table'[File name]=_max)) - CALCULATE(SUM('Table'[Sell]),ALLEXCEPT('Table','Table'[Client]),FILTER('Table','Table'[File name]=_min))2. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- mbylicki5 years agoFrequent Visitor
Thank you v-yangliu-msft
I modified Your solution using 2 independent slicers, so also measure You created in changed from "MAX/MIN" to "SELECTEDVALUE" but Your formula stoped working 😞 Could you please check what I'm doing wrong.
I share modified PBIX here
Thank You!