Forum Discussion

MichelleQLi's avatar
MichelleQLi
Regular Visitor
3 years ago
Solved

If function or switch function to replace value

I have a table looking like below screenshot.  I am not that familiar with Power BI DAX syntax, May I get some help to achieve below outcome:   A new colume to have:   if column 1 equals to "I" ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi MichelleQLi ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) This is my test data.  

    (2) We can create a calculated column.

    Column = IF('Table'[Column1]=="I" && 'Table'[Table3.Column6]<>BLANK(),'Table'[Table3.Column6],'Table'[Column6])

    (3) Then the result is as follows.

     

    Best Regards,

    Neeko Tang

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