The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?
Solved! Go to Solution.
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")
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")
Thank you, this worked!!
You are welcome.
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"}))
User | Count |
---|---|
86 | |
85 | |
35 | |
35 | |
34 |
User | Count |
---|---|
94 | |
79 | |
63 | |
55 | |
52 |