Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hemingt
Helper V
Helper V

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

Hi,

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


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

@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.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

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

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you @Ashish_Mathur for your reply.

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

Hi,

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


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@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.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

thank you @parry2k @Ashish_Mathur 

you both solved my issue. Thank you very much!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
parry2k
Super User
Super User

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



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@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





Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.