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
NickDSL
Helper I
Helper I

Pivoting Columns into one row

I have data like below.

ProductsDateValue
11/1/202310
21/1/202310
11/2/202320
21/2/202320
11/3/202330
21/3/202330
11/4/202340
21/4/202340
11/5/202350
21/5/202350

 

I'm trying to pivot into into this table below.

Date12
1/1/20231010
1/2/20232020
1/3/20233030
1/4/20234040
1/5/20235050

 

When I do Pivot columns I get this below:

Date12
1/1/202310null
1/1/2023null10
1/2/202320null
1/2/2023null20
1/3/202330null
1/3/2023null30
1/4/202340null
1/4/2023null40
1/5/202350null
1/5/2023null50

 

There are other columns and this is a heavily simplified version as I cannot share the exact data.

 

If anyone has any tips or trick on how I can get to my goal (imaged below here again) I would greatly appreciate it!

Date12
1/1/20231010
1/2/20232020
1/3/20233030
1/4/20234040
1/5/20235050
1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

= Table.Pivot(Table.TransformColumnTypes(Source, {{"Products", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(Source, {{"Products", type text}}, "en-US")[Products]), "Products", "Value", List.Sum)

View solution in original post

1 REPLY 1
AlienSx
Super User
Super User

= Table.Pivot(Table.TransformColumnTypes(Source, {{"Products", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(Source, {{"Products", type text}}, "en-US")[Products]), "Products", "Value", List.Sum)

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.

Top Solution Authors