Forum Discussion
Anonymous
5 years agoNot applicable
Distinct Count based on multiple OR conditions
For this new measure, I need a distinctcount of column A if column B has "true" or "neutral" and column C has "yes" or "maybe"
| Column A | Column B | Column C |
| LL | true | yes |
| LL | false | no |
| PP | neutral | no |
| BB | true | maybe |
| BB | true | no |
The result should be 2. Can you help me with the dax formula?
Hi,
This measure works
Measure = CALCULATE(DISTINCTCOUNT(Data[Column A]),(Data[Column B]="true"||Data[Column B]="neutral"),Data[Column C]="yes"||Data[Column C]="maybe")
4 Replies
- AnonymousNot applicable
Hi Anonymous
Have a try
Count = CALCULATE(COUNTROWS(VALUES(yourTable[Column A])),FILTER(yourTable,yourTable[Column B] IN {"true","neutral"} && yourTable[Column C] IN {"yes", "maybe"})) - Ashish_MathurSuper User
Hi,
This measure works
Measure = CALCULATE(DISTINCTCOUNT(Data[Column A]),(Data[Column B]="true"||Data[Column B]="neutral"),Data[Column C]="yes"||Data[Column C]="maybe")
- AnonymousNot applicable
Thank you, this worked!!
- Ashish_MathurSuper User
You are welcome.