Forum Discussion

nuttybuddy's avatar
nuttybuddy
Frequent Visitor
8 years ago

Replicate ISNULL() in power BI DAX

Hi guys

I use the ISNULL() function in SAP Webi as below:

Customer Type = if(ISNULL([Customer type]),"",[Customer type])

 

How can I replicate this as a calculated measure in Power BI DAX?

 

 

Thanks in advance

5 Replies

    • nuttybuddy's avatar
      nuttybuddy
      Frequent Visitor

      ISBLANK() is giving me errors..

       

      Will try the other option...

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        That sounds very strange, I didn't even know that ISBLANK could throw errors.

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi nuttybuddy,

     

    ISNULL is not a supported function in DAX. You should replace it with ISBLANK.

     

    You said ISBLANK returned error, what error did you get?

     

    Regards,

    Yuliana GU

  • Anonymous's avatar
    Anonymous
    Not applicable

    I have solved this by going back to the query editor and adding a transformation step to replace values.  Depending on your data model this might work.  On the column, click Replace Values (Transform tab), Value to Find = null, Replace With your new value.