Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |