Forum Discussion

Simonfrancois's avatar
Simonfrancois
New Member
9 years ago
Solved

Create a table from an other with adding the data of multiple columns

Dear Power BI users, 

 

I have a problem with a set of data from a database. 

 

My table (Result) look like this : 

 

Columns : ID ; Name ; Month-1 ; Month 2 ; ... ; Month 12 

 

The data in Month (1-12) is decimal number. 

 

I would create in Power BI desktop querry editor a table from the table "Result" with the following columns : ID ; Name ; Month ; Data_Month

 

The columns ID and Name stay the same 

 

The column Month contain the name of the columns depending of Data_month : Month 1; Month 2, ... Month 12

 

The column Data_month contain the data taken in relation with the column month and the ID. 

 

 

I put an image of the initial Table "RESULT" and the desired table "REPORT".

I took for the example only columns Month 1 Month 2 and month 12

 

Thanks for your help,

 

Simon

 

 

 

  • Simonfrancois In the Query Editor => got to Transform Tab => select both columns ID and NAME => Unpivot Other Columns

     

     

    Hope this helps! :smileyhappy:

     

     

2 Replies

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

    Simonfrancois In the Query Editor => got to Transform Tab => select both columns ID and NAME => Unpivot Other Columns

     

     

    Hope this helps! :smileyhappy:

     

     

    • Simonfrancois's avatar
      Simonfrancois
      New Member

      Dear Sean, 

       

      I would like to thanks you a lot for the solution ! 

       

      Have a nice day,

       

      Simon