Forum Discussion

alexglickfire's avatar
alexglickfire
Frequent Visitor
2 years ago

Changing NULL data to 0 or a letter

Hello Team,

 

I am trying to convert a BLANK/NULL value to a 0 so i am able to filter out everything else.

 

I have tried the following column DAX query howerver it is not changing anything besides duplicating the column values.

 

Please help if you can 🙂

 

Sort LineItem = IF(OrderDetails[LineItemNo] = BLANK(), -1/0, OrderDetails[LineItemNo])

 

 

4 Replies

  • Hi alexglickfire - you can try with isblank() as below

     

    Sort LineItem =
    IF(
    ISBLANK(OrderDetails[LineItemNo]),
    0,
    OrderDetails[LineItemNo]
    )

     

    Hope this helps.

    • alexglickfire's avatar
      alexglickfire
      Frequent Visitor

      What i am trying to do ultimetly is only to show the BLANK values as those are the order that have errors and need looked at, however cant sort by BLANK/NO values

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi alexglickfire ,

    Based on my testing, there is no problem with the expression.

    So, the problem is with the LineItemNo column. Is your LineItemNo column a raw data column? If it is a calculated column, how is the representation written? Can you provide the data for LineItemNo data?

     

    Best Regards,

    Wisdom Wu

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