Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

If one column is blank select another column

HI, 

 

I am trying to work out the formula for this: if purchasing[Actual ship date] is blank select Purchasing[Confirmed ship date]. 

 

ie. PO number 26049 - Actual ship date = Blank, Confirmed ship date = 16/02/2024

Po number 28502 - Actual ship date = 19/04/2024 , Confirmed ship date = 13/04/2024

 

I want it to select actual ship date unless it is blank then confirmed ship date. 

 

Thank you !

  • Hi,

    Write this calculated column formula

    Actual date = if(isblank(purchasing[Actual ship date]),purchasing[Confirmed ship date],purchasing[Actual ship date])

4 Replies

  • Hello,

     

    Please try the following DAX:

     

    If ( ISBLANK(Selectedvalue([Actual Ship date])),Selectedvale([Confirmed ship date]),Selectedvalue([Actual Ship date]))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Unfortunately im getting 'too many arguments were passed'

       

  • Hi,

    Write this calculated column formula

    Actual date = if(isblank(purchasing[Actual ship date]),purchasing[Confirmed ship date],purchasing[Actual ship date])

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, Anonymous 

     

    Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.

    Measure:

    TureDate =
    
    IF (
    
        ISBLANK ( SELECTEDVALUE ( 'Purchasing'[ Actual ship date] ) ),
    
        SELECTEDVALUE ( 'Purchasing'[Confirmed ship date] ),
    
        SELECTEDVALUE ( 'Purchasing'[ Actual ship date] )
    
    )

     

    If this does not work, could you please share some sample data without sensitive information and expected output.
    How to provide sample data in the Power BI Forum - Microsoft Fabric Community

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum