Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have a query where i want to count all the values in a column, but without the cells where there are zeros filled in and without the ones which are blank. I tried to use the following DAX, but it doesn't work.
Solved! Go to Solution.
Hi @samoberoi ,
You answered your own question 😊. As your column in question is in text format and boolean expression accepts the evaluation of the same data type, modifying your formula to below formula will fix the problem. Specifically, please try using "0" instead of 0 in your formula.
CALCULATE(
COUNTROWS(
FILTER(
Table,
Table[column1] <> "0"
&& NOT(ISBLANK(Table[column1])))))
Best regards,
Thank you so much for your help. It worked.
Thanks again.
Hi @samoberoi ,
May I ask you what is the error message you are getting? Is your Table[column1] in numerical data format? I tried your formula with my data and it threw in error when applied to string data type column, but produced the desired output when the column was integar data type.
Best regards,
Hi,
When i put in Table visual it says, "Can't display the visual". Ans yes the column is in Text format, because there are text values in it.
I used another measure as below and it works, but the first one doesn't work.
Thanks
Hi @samoberoi ,
You answered your own question 😊. As your column in question is in text format and boolean expression accepts the evaluation of the same data type, modifying your formula to below formula will fix the problem. Specifically, please try using "0" instead of 0 in your formula.
CALCULATE(
COUNTROWS(
FILTER(
Table,
Table[column1] <> "0"
&& NOT(ISBLANK(Table[column1])))))
Best regards,
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
85 | |
67 |