Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How To Combine Two Columns Into One Column

Hi all! I'll start of by saying I'm new to Power BI, my skills are at a beginner level...

 

I have a table with two different columns, "Service" and "Configuration Item."

An Example:

ServiceConfiguration Item
1A
2B
3C
4D
5E

 

I would like to combine the two columns into one new column so it looks like this (there may be duplicates, which would need to be removed):

Service and CI
1
2
3
4
5
A
B
C
D

 

After some Googling, I can only find information on "merging columns," but the results are not what I need. For example:

Incorrect Result
1 A
2 B
3 C
4 D
5 E

 

Is there a DAX command for this?

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    It seems to be easy to achieve.

    Please try what I do below.

    Select two columns at the same time, and then click 'Unpivot Columns'.

    You'll get the column you want.

    Rename the Value column and remove the Attribute column. Below is the result.

     

     

     

    Best Regards,

    Stephen Tao

     

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

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi thanks, but I don't understand. I'm a beginner and can't work out how to list that command and your video is difficult to follow.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    It seems to be easy to achieve.

    Please try what I do below.

    Select two columns at the same time, and then click 'Unpivot Columns'.

    You'll get the column you want.

    Rename the Value column and remove the Attribute column. Below is the result.

     

     

     

    Best Regards,

    Stephen Tao

     

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

    • LaylaDantiandou's avatar
      LaylaDantiandou
      Frequent Visitor

      Hi Anonymous .  Thank you so much for the genius simplicity of your solution!  Much gratitude.