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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic "Pivot" Table

Hello,

 

I would lik transform this table top have this result : 

 

Pierrem31_2-1675181106595.png

 

 

My solution would be to split the main table into mutiple table like that : 

Pierrem31_3-1675181128153.png

And so one ...

 

Then to merge and expand for each City, step by step.

 

Two problem to this solution : 

 - I do not arrive to split my main table into multiple tables "By City" (Ahhhhh !)

- I have to manually merge and expand for each City : In the futur, in I add a City, it won't work

 

Do you have a elegant solution to this problem ?

 

Thank you, 

 

Pierre

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @Anonymous 

Here are the steps you can refer to :
(1)My test data is the same as yours.

(2) You just need to click the "Pivot Column" in Power Query Editor:

vyueyunzhmsft_0-1675218617057.png

vyueyunzhmsft_1-1675218628116.png

(3)Then we can meet your need , the result is as follows:

vyueyunzhmsft_2-1675218646680.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi , @Anonymous 

Here are the steps you can refer to :
(1)My test data is the same as yours.

(2) You just need to click the "Pivot Column" in Power Query Editor:

vyueyunzhmsft_0-1675218617057.png

vyueyunzhmsft_1-1675218628116.png

(3)Then we can meet your need , the result is as follows:

vyueyunzhmsft_2-1675218646680.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

Hi Aniya, 

Simple and efficient, it does the job !

 

I have a bit of work to complete my job, but it's a good beginning, thank you, 

 

Pierre

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.