cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hemingt Member
Member

How to transfer a row to to a column

Hi Team,

360截图-1435201328.jpg

I have a such table named 'Data' in Power BI Desktop. and I have another table named 'Plan' with two columns 'Week', 'Plan'.

I want to create a page filter which let user to select 'Project', 'Cycle Name', 'Version Name', these three parameters can identiy one unique row of the table 'Data', I want to update the table 'Plan' after user selection with data from table 'Data' column G ~ 

for an example,

if project=FWAFM, Cycle Name=FT and Version Name="FMR2002", the table 'Plan' will filled as follows,

Week  Plan

1901

1902

1903

1904  39

1905  78

1906  117

1907  156

.....

 

Then related report will get data from table 'Plan'.

Is it possible for Power BI to implement such requirement? How to do?

Thank you very much!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: How to transfer a row to to a column

Hi,

In the Query Editor, select the first 6 columns, right click and select "Unpivot other columns".

Super User
Super User

Re: How to transfer a row to to a column

@hemingt solution is attached, I have added extra step to replace null with zero so that you can see all the year, if you dont replace null with zero then those years will disappears when you do unpivot. You can make the change and update the solution as per your needs.





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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




8 REPLIES 8
Super User
Super User

Re: How to transfer a row to to a column

@hemingt can you share data in excel format? May be share it thru onedrive/google drive something like that





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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




Super User
Super User

Re: How to transfer a row to to a column

Hi,

Select data from column A:F and unpivot the other columns.

Hope this helps.

hemingt Member
Member

Re: How to transfer a row to to a column

@parry2k 

Hi , the attached excel is my raw data, and it will be imported to mysql database, then Power BI desktop take mysql database as data source.

Please get the excel from https://1drv.ms/x/s!AsM9bO8zGUN6qm4gGURkOUUOuKLI





hemingt Member
Member

Re: How to transfer a row to to a column

Thank you @Ashish_Mathur for your reply.

Can you detail it? and it's very appreicated if there is an example.

Super User
Super User

Re: How to transfer a row to to a column

Hi,

In the Query Editor, select the first 6 columns, right click and select "Unpivot other columns".

Super User
Super User

Re: How to transfer a row to to a column

@hemingt solution is attached, I have added extra step to replace null with zero so that you can see all the year, if you dont replace null with zero then those years will disappears when you do unpivot. You can make the change and update the solution as per your needs.





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

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




hemingt Member
Member

Re: How to transfer a row to to a column

thank you @parry2k @Ashish_Mathur 

you both solved my issue. Thank you very much!

Super User
Super User

Re: How to transfer a row to to a column

You are welcome.