Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I am trying to create a measure that returns the total number of 0's and blanks in a column. I have tried this DAX:
Solved! Go to Solution.
@Anonymous ,
Please try this:
Count_ZeroOrBlank = CALCULATE( COUNTROWS( table1 ),
FILTER( table1, table1[Quantity] = 0 || table1[Quantity] = Blank() ))
The error message I believe is due to you putting your 0 in quotes. This is making it text.
I assume your Quantity field is numeric.
Trust this works for you.
Regards,
Hi @Anonymous
You can use this formula knowing that null values are also considered as 0
COUNTROWS(FILTER('Table';'Table'[Column1]=0))
Did it work ? 👌Mark it as a solution to help spreading knowledge 👉A kudos would be appreciated
@Anonymous ,
Please try this:
Count_ZeroOrBlank = CALCULATE( COUNTROWS( table1 ),
FILTER( table1, table1[Quantity] = 0 || table1[Quantity] = Blank() ))
The error message I believe is due to you putting your 0 in quotes. This is making it text.
I assume your Quantity field is numeric.
Trust this works for you.
Regards,
User | Count |
---|---|
97 | |
85 | |
77 | |
66 | |
62 |
User | Count |
---|---|
110 | |
96 | |
95 | |
64 | |
57 |