Forum Discussion
Thilo
7 years agoFrequent Visitor
DAX - Complex problem (Nested Grouping + MInx ?)
Hi there! My first post here and I guess it's a more complicated problem. The following data is given (excluding the win column!): I have serveral dealers that sell the same products (look for...
- 7 years ago
Hi Thilo ,
The following is my sample you can have a try.
- Create a calculated column
Min = CALCULATE(MIN(Table1[Product Price]),FILTER(Table1,Table1[Product Key] = EARLIER(Table1[Product Key]) && Table1[Product Categorie] = EARLIER(Table1[Product Categorie]) && Table1[Min.Amount] >=10))
- Create measures
Win = VAR a = CALCULATE(MIN(Table1[Min]),FILTER(Table1,Table1[Min.Amount] >=10)) return IF(MAX(Table1[Product Price]) = a, 1,0) Total = SUMX(Table1,[Win])
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xuding-msft
7 years agoCommunity Support
Hi Thilo ,
The following is my sample you can have a try.
- Create a calculated column
Min = CALCULATE(MIN(Table1[Product Price]),FILTER(Table1,Table1[Product Key] = EARLIER(Table1[Product Key]) && Table1[Product Categorie] = EARLIER(Table1[Product Categorie]) && Table1[Min.Amount] >=10))
- Create measures
Win = VAR a = CALCULATE(MIN(Table1[Min]),FILTER(Table1,Table1[Min.Amount] >=10)) return IF(MAX(Table1[Product Price]) = a, 1,0) Total = SUMX(Table1,[Win])
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Thilo7 years agoFrequent Visitor
v-xuding-msft
Thank you very much Xue! Your solution is working for the test date. Concerning the real data I still have some issues, but I am positive that I'll be able to resolve them.
Best wishes
Thilo