Forum Discussion
Anonymous
6 years agoNot applicable
Measures by classification
Hi Experts, I have a question that struggle me for a time, would anyone can help me to solve? I would like to create 4 measures (It's 2 types of measure in fact) Please find the raw sample f...
- 6 years ago
Ashish_Mathur
Super User
6 years agoHi,
Your expected result seems incorrect. On creating a simple Pivot Table (see image below), there is no Customer (for any Item) which has both A and B. Once you correct your source data, these measures should works for "Only A" and "Only B"
Only A = SUMX(FILTER(SUMMARIZE('Table','Table'[Customer],"ABCD",CALCULATE(DISTINCTCOUNT('Table'[code]),all('Table'[Item])),"EFGH",CALCULATE([Total],'Table'[Code]="A")),[ABCD]=1),[EFGH])
Only B = SUMX(FILTER(SUMMARIZE('Table','Table'[Customer],"ABCD",CALCULATE(DISTINCTCOUNT('Table'[code]),all('Table'[Item])),"EFGH",CALCULATE([Total],'Table'[Code]="B")),[ABCD]=1),[EFGH])
Anonymous
6 years agoNot applicable
Hi Ashish_Mathur
I would like to make this question simple, I now just want the Yellow part - A Only.
such that the sum of amount will exclude those customers have both A and B. hope that you can help, many thanks!
Simon
- Ashish_Mathur6 years ago
Super User
- Anonymous6 years agoNot applicable
Ashish_Mathur
You're so great! It's exactly what I want. a million thanks ^^- Ashish_Mathur6 years ago
Super User
You are welcome.