cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chinaik123
Helper I
Helper I

Transformation for this table type

Hi, 

I have a question. How would I be able to use this kind of tables to transform?

I want to do a combination and make sure once i choose a metric, i can then transform to a chart easily.

chinaik123_0-1677127048912.png

 

1 ACCEPTED SOLUTION

@chinaik123 

you can do the same say

1.PNG

 

then you can split the column to get year and month

 

2.PNG3.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
ryan_mayu
Super User
Super User

@chinaik123 

in PQ, you can try to select the first column and unpivot other columns

Unpivot columns - Power Query | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu,

 

I tried to Unpivot but it does not look like i can use this formatchinaik123_0-1677134168736.png

 

Thanks,

Ricky

 

@chinaik123 

select first column and unpivot other columns

1.PNG

you should get below output

2.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu ,

I am able to do it if my Jan - April column does not include date.

But when i include date like Jan 2023, it does not work already.

could you pls sample data and what's the expected output? Since I didn't see year info in the screenshot you provided.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_maju,

Sorry, i change my sample to add in the year as i left out previously..

This is the sample and I am trying to get something similar to you. However, when i unpivot and do the same, it does not align well.

chinaik123_0-1677137769762.png

After I unpivot Other Columns i will recieve something like this 

chinaik123_1-1677137830631.png

 

 

@chinaik123 

you can do the same say

1.PNG

 

then you can split the column to get year and month

 

2.PNG3.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you! I found out why I am not able to do that, cause I did not use my first rows as header. After doing that, I am able to convert it. Thanks!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors