Forum Discussion

bourne2000's avatar
bourne2000
Helper V
4 years ago
Solved

Issue in Unpivot in Power Query

Hi

 

I am having below table

 

 

I want to have the output as follow,

 

CustomYearValue
Tower2018180051.45
Tower201916603.18

 

 

When I tried to use unpivot, I am getting below

 

 

 

Can anyone advise?

  • Rename the Value columns before the Unpivot.  Rename them to be like ValYear1, ValYear2 , that is, put the number at the end.  This will be used to identify pairs.

    OK, so do the unpivot.

    Then Split the Attribute column By Non-Digit to Digit.

    Then Pivot the Attribute.1 column using Values and "Don't Aggregate".

    --

    Let me know how it goes

     

     

1 Reply

  • HotChilli's avatar
    HotChilli
    Community Champion

    Rename the Value columns before the Unpivot.  Rename them to be like ValYear1, ValYear2 , that is, put the number at the end.  This will be used to identify pairs.

    OK, so do the unpivot.

    Then Split the Attribute column By Non-Digit to Digit.

    Then Pivot the Attribute.1 column using Values and "Don't Aggregate".

    --

    Let me know how it goes