Hi Community,
I tried to group customers based on purchasing same TYPE of product or Not.
If customer A buys fruit and machine , it is Mixed otherwise Non- mixed.
I tried to find previous row value, apply condition of mixed and non- mixed but couldnt achieve what I needed.
Any help will be appreciated.
For the test file:
Solved! Go to Solution.
Hi @schoden
This measure does the trick
Measure =
VAR _DistinctType = CALCULATE(DISTINCTCOUNT('Table'[Type]), FILTER(ALL('Table'), 'Table'[Customer ] = SELECTEDVALUE('Table'[Customer ])))
RETURN
IF (_DistinctType > 1, "Mixed", "Not Mixed")
Regards
Phil
Proud to be a Super User!
Hi @schoden
Use this code to add a new table:
New Table = SUMMARIZE('Table','Table'[Customer ],"Check",if(CALCULATE(DISTINCTCOUNT('Table'[Type]),ALLEXCEPT('Table','Table'[Customer ]))>1,"Mixed","Not Mixed"))
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @schoden
Use this code to add a new table:
New Table = SUMMARIZE('Table','Table'[Customer ],"Check",if(CALCULATE(DISTINCTCOUNT('Table'[Type]),ALLEXCEPT('Table','Table'[Customer ]))>1,"Mixed","Not Mixed"))
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Thanks for saving my day 😄
Hi @schoden
This measure does the trick
Measure =
VAR _DistinctType = CALCULATE(DISTINCTCOUNT('Table'[Type]), FILTER(ALL('Table'), 'Table'[Customer ] = SELECTEDVALUE('Table'[Customer ])))
RETURN
IF (_DistinctType > 1, "Mixed", "Not Mixed")
Regards
Phil
Proud to be a Super User!
Thanks for sharing the knowledge 😄
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
User | Count |
---|---|
125 | |
75 | |
65 | |
56 | |
55 |
User | Count |
---|---|
199 | |
104 | |
88 | |
79 | |
77 |