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.
Hello, I'm trying to create a new measure that will take value 1 if number of rows in a specific table is greater than 10, and 0 otherwise. Here's the code that I use:
GreaterThanTen = IF(COUNTROWS(Table)>10,1,0)
This measure always returns 0, although there are cases when it's supposed to be 1.
Can you please explain what's wrong?
Thank you.
I have replicated your scenario.
GreaterThanTen = IF(COUNTROWS('Table')>10,1,0)
It is working for me
When I apply the filter it is returning zero, which is expected.
In your case, maybe some external filters are there. Verify that.
If you don't want to affect external filters, you can use ALL() or ALLEXCEPT() functions.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂