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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Tevon713
Helper IV
Helper IV

Convert single column to row

Hi.

 

I have table as follow, want to convert the "Account" as row. What is the best way to transform this? Thanks.

 

Current:

Site #YearMonthAccountValue
Site 12019JanuaryCount1100
Site 22019JanuaryCount2200
Site 32019JanuaryCount3300
Site 12019FebruaryCount1100
Site 22019FebruaryCount2200
Site 32019FebruaryCount3300
Site 12020JanuaryCount1100
Site 22020JanuaryCount2200
Site 32020JanuaryCount3300

 

Post:

Site #YearMonthCount1Count2Count3
Site 12019January100200300
Site 12019February100200300
Site 12020January100200300
1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @Tevon713 ,

 

I have not gotten to the post result you wished for, but here somethinng that maybe gets you closer to a solution:

tomfox_0-1653505517997.png

 

What I did was that I pivoted on the Account column using the Value column as value. To do this, mark the Account column and click on Pivot column in the transform section:

tomfox_1-1653505651290.png

 

 

What puzzles me is how you would want to return 200 for Site 1 in the Column Count2, since in your raw data Site 1 never has the attribute Count2. Same thing for Count3...

 

Hope this helps you anyway 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

2 REPLIES 2
tackytechtom
Super User
Super User

Hi @Tevon713 ,

 

I have not gotten to the post result you wished for, but here somethinng that maybe gets you closer to a solution:

tomfox_0-1653505517997.png

 

What I did was that I pivoted on the Account column using the Value column as value. To do this, mark the Account column and click on Pivot column in the transform section:

tomfox_1-1653505651290.png

 

 

What puzzles me is how you would want to return 200 for Site 1 in the Column Count2, since in your raw data Site 1 never has the attribute Count2. Same thing for Count3...

 

Hope this helps you anyway 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Hi @tackytechtom.,

 

Thanks for your help. Sorry I typed up too quick. The result you showed is correct. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors