Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

POWER BI DESKTOP

Hi All,

 

I am trying to write a query to get Result table as shown below. Column 1 and Column 2 are the inputs and "Result" is the output.

Can anyone help me on this:

 

TableColumn 1Column 2Result 
1DEF DEF
2ABCGHIABC
3 JKLJKL
  • Hi Pooja,

     

    You can get with the below dax.

     

    Result = IF(SELECTEDVALUE('Table'[Column 1])<>BLANK(),SELECTEDVALUE('Table'[Column 1]),SELECTEDVALUE('Table'[Column 2]))
     

    Appreciate a Kudos! πŸ™‚
    If this helps and resolves the issue, please mark it as a Solution! πŸ™‚

    Regards,
    N V Durga Prasad

     

2 Replies

  • nvprasad's avatar
    nvprasad
    Icon for Solution Sage rankSolution Sage

    Hi Pooja,

     

    You can get with the below dax.

     

    Result = IF(SELECTEDVALUE('Table'[Column 1])<>BLANK(),SELECTEDVALUE('Table'[Column 1]),SELECTEDVALUE('Table'[Column 2]))
     

    Appreciate a Kudos! πŸ™‚
    If this helps and resolves the issue, please mark it as a Solution! πŸ™‚

    Regards,
    N V Durga Prasad

     
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      Yes it worked. Thanks for your help πŸ™‚