Forum Discussion

manishsalanke's avatar
manishsalanke
Helper II
3 years ago
Solved

conditional status column

hi, there iam new in power bi need some help in power di dax ,  i have a conditon that need to create a "states column " for orders which are dispatched or pending so accordingly i have to add the c...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi manishsalanke 

     

    I created a demo for you. If "delivery date" is blank and "dsp date" is full "pending", "delivery date" is not blank and "dsp date" is not blank "complete", since I don't know what the data consists of, I made it blank even if there is something other than these conditions.

     

    States column =
    IF('Table'[delivery date]=blank() && 'Table'[dsp date]<>blank(),"Pending",
    IF('Table'[delivery date]<>blank() && 'Table'[dsp date]<>blank(),"Completed"
    ,blank()))
     

     

    Best regards,

    Ezgi Naz Aslankara

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

     

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  manishsalanke ,

    Here are the steps you can follow:

    1. Create calculated column.

    Flag =
    IF (
        'Table'[dilevery date] <> BLANK ()
            && 'Table'[dsp date] = BLANK (),
        "pending",
        IF (
            'Table'[dilevery date] <> BLANK ()
                && 'Table'[dsp date] <> BLANK (),
            "completed",
            "others"
        )
    )
    

    2. Result:

     

    Best Regards,

    Liu Yang

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