Forum Discussion

WJ876400's avatar
WJ876400
Icon for Helper IV rankHelper IV
7 years ago
Solved

Merging Columns

Hi

 

I have two columns like below. The main data I want to use is from Column B, however when column B has a blank I want to use the data in the corrosponding cell in column A so I end up with column C. Is this possible, thanks in advance

 

ABC
 GreenGreen
 BlueBlue
 RedRed
Yellow Yellow
 PinkPink
Black Black
Purle Purle
 OrangeOrange

 

 

  • In Power Query this is a pretty simple if [column b] <> "" then [column b] else [column a], DAX would be similar

4 Replies

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

    In Power Query this is a pretty simple if [column b] <> "" then [column b] else [column a], DAX would be similar

    • WJ876400's avatar
      WJ876400
      Icon for Helper IV rankHelper IV

      jthomson  sorry i put this as solved but it is not working. When i put in the "" it doesnt work with the measure

       

      thanks


       

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

        Maybe try null instead dependent on how exactly your data handles blanks

    • jinny_le's avatar
      jinny_le
      Frequent Visitor

      Hello - would you have suggestion if i have more than 2 columns? Thanks!