Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Solved! Go to Solution.
Do you mean that you want a count of rows where [Measure1] = "Yes" and [Measure2] = "No", or do you want a count of rows where [Measure1] is not the same as [Measure2]? (e.g. you want to count where Measure1 is yes & Measure2 is no, AND where Measure1 is No & Measure2 is Yes in an XOR manner)
Whatever way you want to set this up, it's mostly the same syntax. Just chain different conditions together with && to satisfy both conditions, and chain them with || to satisfy one or the other.
CALCULATE (
COUNT ( Table[Company] ),
FILTER ( Table, [Measure1_Yes/No] = "Yes" && [Measure2_Yes/No] = "No")
)Or if you're trying to do an XOR:
CALCULATE (
COUNT ( Table[Company] ),
FILTER ( Table, [Measure1_Yes/No] <> [Measure2_Yes/No])
)You can also use COUNTAX syntax to avoid using the CALCULATE term. With DAX, there's always a ton of ways to skin the cat, you just have to use the one that makes sense to you.
How are you tracking companies/ where is this data stored; is that the customer? If the customer is the data you want to count you should be able to drag the customer column into the field for a card visual and select distinct count. This will only count each customer once. Add the measure on the visual level filter and select the category you want to count.
Hi @Jansco
If you can change measures(ie “Yes”, “no”) to calculated columns,you may use the workaound as doobie said. Second way,If you just need the count of (“Yes”, “no”),you may create two measures like below:
Count_yes =
CALCULATE (
COUNT ( Table[Company] ),
FILTER ( Table, [Measure_Yes/No] = "Yes" )
)
Regares
Do you mean that you want a count of rows where [Measure1] = "Yes" and [Measure2] = "No", or do you want a count of rows where [Measure1] is not the same as [Measure2]? (e.g. you want to count where Measure1 is yes & Measure2 is no, AND where Measure1 is No & Measure2 is Yes in an XOR manner)
Whatever way you want to set this up, it's mostly the same syntax. Just chain different conditions together with && to satisfy both conditions, and chain them with || to satisfy one or the other.
CALCULATE (
COUNT ( Table[Company] ),
FILTER ( Table, [Measure1_Yes/No] = "Yes" && [Measure2_Yes/No] = "No")
)Or if you're trying to do an XOR:
CALCULATE (
COUNT ( Table[Company] ),
FILTER ( Table, [Measure1_Yes/No] <> [Measure2_Yes/No])
)You can also use COUNTAX syntax to avoid using the CALCULATE term. With DAX, there's always a ton of ways to skin the cat, you just have to use the one that makes sense to you.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 65 | |
| 31 | |
| 26 | |
| 26 |