Forum Discussion

LY18's avatar
LY18
Icon for Helper I rankHelper I
6 years ago
Solved

duplicate lines based on a list value

Hi 

 

today i got a new issue 😉

 

i got a source table with information that are presented like this

ID MEASUREID_PARAMETERPARAMETER_NAMEEQT_CONCERNEDGroup_ValueGroup_SPEC
11PARAM1EQT1,EQT2,EQT350.45100
21PARAM1EQT1,EQT2,EQT350.69100
31PARAM1EQT1,EQT360.36100
42PARAM2EQT1,EQT47.350
52PARAM2EQT1,EQT510.8450
62PARAM2EQT5,EQT6,EQT910.450
72PARAM2EQT5,EQT6,EQT95.660
83PARAM3EQT1,EQT10,EQT97.510
93PARAM3EQT2,EQT54.610
103PARAM3EQT2,EQT32.310
113PARAM3EQT4,EQT102.550
123PARAM3EQT6,EQT754.650

 

In order to merge information by EQT and do some more calculation i would need to split the list of "EQT_CONCERNED" to get 1 line for each EQT (not split in column, but in rows ...) ... so for exemple line 1 should be transformed into 3 lines

 

11PARAM1EQT150.45

100

11PARAM1EQT250.45100
11PARAM1EQT350.45100

 

do you have some advise to do it in power bi query ?

 

thanks in advance for your help

 

regards

  • LY18 

     

    Go into Power Query and:

    1) Select your EQT_CONCERNED column, select "Split Column" from the Home tab in the ribbon:

     

    Now select the three new columns created and in the "Transform" tab choose the unpivot option/Unpivot Columns:

    Two new columns are created: Rename the "Values Column and delete the Attributes column:

     

    You should be set.

1 Reply

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    LY18 

     

    Go into Power Query and:

    1) Select your EQT_CONCERNED column, select "Split Column" from the Home tab in the ribbon:

     

    Now select the three new columns created and in the "Transform" tab choose the unpivot option/Unpivot Columns:

    Two new columns are created: Rename the "Values Column and delete the Attributes column:

     

    You should be set.