Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all!
I'm trying to count the number of rows where two different columns match and don't match.
Table 1:
CoumnA | ColumnB |
AA | BB |
CC | CC |
AA | AA |
BB | BB |
CC | BB |
The answers I'm looking for here is:
Matching = 3
Not matching = 2
I've tried dofferent versions of COUNTROW but I'm simply failing on the syntax. Any ideas?
Solved! Go to Solution.
Hi @foging
COUNTROWS ( FILTER ( 'Table', 'Table'[XolumnA] = 'Table'[XolumnB] ) )
and
COUNTROWS ( FILTER ( 'Table', 'Table'[XolumnA] <> 'Table'[XolumnB] ) )
Hi @foging
COUNTROWS ( FILTER ( 'Table', 'Table'[XolumnA] = 'Table'[XolumnB] ) )
and
COUNTROWS ( FILTER ( 'Table', 'Table'[XolumnA] <> 'Table'[XolumnB] ) )