Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Counting empty row in a date Column

Hello friend,

 

Thank You for helping figuring out this DAX formula. I'm trying to count empty row in a date column. my initial code was 

Pending = COUNTROWS( FILTER('Fact-Tasks','Fact-Tasks'[Closed], ) = "Blank")) I get no error nor data from this calculated measure.
Now while using it in my report I get this error " Error Message:
MdxScript(Model) (4, 61) Calculation error in measure 'Fact-Tasks'[Pending]: DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values. "
 
I rewrite the code to be 
Pending = COUNTROWS( FILTER(CONVERT('Fact-Tasks','Fact-Tasks'[Closed], STRING) = "Blank")) but It's not a valid expression.

Thank You very much for Your help.
  • Hi Anonymous 

    you can write it like this

    Pending = COUNTROWS( FILTER('Fact-Tasks','Fact-Tasks'[Closed]= BLANK ( ) ))

2 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi Anonymous 

    you can write it like this

    Pending = COUNTROWS( FILTER('Fact-Tasks','Fact-Tasks'[Closed]= BLANK ( ) ))