Forum Discussion

Rohit_23's avatar
Rohit_23
Regular Visitor
3 years ago
Solved

Copying/Transfrom multiple columns under each other.

Hi,

I want to transform my data such that every time i update my excel sheet, bi should transform the data such that all the specified columns are below each other.

Raw Data:

CountryRegionProductSample TypeQ1Q2Q3
Inda SouthADAAA302323
Inda WestBODADD43723
Inda SouthFGSAA5634234
Inda NorthKSAAA7868647
Inda WestSISSD323423
Inda EastCFFLK6776223
Inda SouthDJQEE12345

 

What i want: Is it Possible??

CountryRegionProductSample TypeQ
ISouthADAAA30
IWestBODADD43
CSouthFGSAA56
INorthKSAAA78
CWestSISSD32
YEastCFFLK67
DSouthDJQEE12
ISouthADAAA23
IWestBODADD7
CSouthFGSAA34
INorthKSAAA68
CWestSISSD34
YEastCFFLK76
DSouthDJQEE34
ISouthADAAA23
IWestBODADD23
CSouthFGSAA234
INorthKSAAA647
CWestSISSD23
YEastCFFLK223
DSouthDJQEE5
  • HI,

     

    you could unpivot the columns in power query. If you are likely to have more quarters than just the 3 listed there - select all the columns except the quarters, right click and select unpivot other columns.

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

  • Okay, so all you have to do is go into power query select the ones you don't want in one column, right click the selection and select unpivot other columns

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

4 Replies

  • DOLEARY85's avatar
    DOLEARY85
    Resident Rockstar

    HI,

     

    you could unpivot the columns in power query. If you are likely to have more quarters than just the 3 listed there - select all the columns except the quarters, right click and select unpivot other columns.

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

    • DOLEARY85's avatar
      DOLEARY85
      Resident Rockstar

      Okay, so all you have to do is go into power query select the ones you don't want in one column, right click the selection and select unpivot other columns

       

      If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

      • Rohit_23's avatar
        Rohit_23
        Regular Visitor

        Thanks a lot,  this solution worked perfectly as i wanted.