1
votes

I'm trying to create a PBI column in Dax than evaluates if a DateTime column is not blank. There currently is not an ISNOTBLANK() clause in Power BI so I can't outright reference that.

However, since the column is in a DateTime format, I can't substitute ISNOTTEXT() or ISNOTNUMBER() as those create a parsing error. Using || as an OR evaluation instead if && as an AND evaluation is not a usable solution either.

I tried writing a statement like

DateFilter = IF(ISBLANK(Table[Date1]) && ISBLANK(Table[Date2]), "BOTH BLANK", 
             IF(ISBLANK(Table[Date1]) && Table[Date2]<>ISBLANK(Table[Date2]), "Date1 BLANK"
             IF(ISBLANK(Table[Date2]) && Table[Date1]<>ISBLANK(Table[Date1]), "Date2 BLANK"
             IF( Table[Date1]<>ISBLANK(Table[Date1]) && Table[Date2]<>ISBLANK(Table[Date2]), "NEITHER BLANK"
             ,"ERROR"))))

But using a scalar ISBLANK() clause is not possible in this format and throws a scalar error. Is there any way to write a Dax query that produces results equivalent to ISBLANK()?

1

1 Answers

7
votes

There is an ISBLANK function and a NOT function, so you can put them together:

IsNotBlank = NOT(ISBLANK())