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,
I am trying to write a formula for a new column or measure that counts rows in a table but with conditions:
e.g. to count rows in TABLE1 where TABLE1[column1]='Red'.
what is the best way to do this please? Tried the countrows and countx function but no success
Solved! Go to Solution.
HI @nnn123
Try
Measure = CALCULATE ( COUNTROWS ( Table1 ), Table1[Column1] = "Red" )
HI @nnn123
Try
Measure = CALCULATE ( COUNTROWS ( Table1 ), Table1[Column1] = "Red" )
That's great thank you Zubair!