Forum Discussion

samoberoi's avatar
samoberoi
Helper III
2 years ago
Solved

Count values without zeros and without blanks

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...
  • DataNinja777's avatar
    DataNinja777
    2 years ago

    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,