Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 🙂
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |