The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 🙂
User | Count |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |