Forum Discussion

SJ25's avatar
SJ25
Resolver I
6 years ago
Solved

Using NOT ISBLANK as a filter

This should be quite simple, as I've done this before and it has worked very well. I'm trying to count rows that aren't blank and then there's the syntax I'm using:

CALCULATE(COUNTROWS('TableName'),FILTER('TableName', NOT(ISBLANK('Tablename'[Sales Order])))))
But this gives me a count of all the rows, why doesn't this work?

It gives me the correct value when I use <> BLANK but what's wrong with the above method?
  • parry2k's avatar
    parry2k
    6 years ago

    SJ25 check this post on blanks(), and make sure the column is actually blank() value, not space or other hidden characters.

3 Replies

  • SJ25 ,

    Check if you column has some space trim those

    and then try CALCULATE(COUNTROWS('TableName'),FILTER('TableName', NOT(ISBLANK('Tablename'[Sales Order]) && 'Tablename'[Sales Order] <> "" )))))

     

    • parry2k's avatar
      parry2k
      Super User

      SJ25 check this post on blanks(), and make sure the column is actually blank() value, not space or other hidden characters.

  • Icey's avatar
    Icey
    Community Support

    Hi SJ25 ,

     

    I see that you have found the cause of this issue: 


    That was it. It was a text column and should've converted to a number format.

     


    Reference is your another post: Using NOT ISBLANK as filter.

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.