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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
SteveIOW
Helper II
Helper II

pivot? sort of

Dear all,

 

I am loading in a table of data from SQL that has this sort of format... (only more columns)

DateValue
05/11/2022a
05/11/2022b
05/11/2022c
01/10/2022x
01/10/2022y

I need to get it into this format during the load

DateValue 1Value 2 Value 3
05/11/2022abc
01/10/2022xy 

given that I don't know what the maximum number of 'Values' I am going to get is.

 

is anyone able to help?

 

kind regards

 

Steve

1 ACCEPTED SOLUTION
SteveIOW
Helper II
Helper II

Hah - I've done it.

I created a column in the SQL using ROWCOUNT and PARTITION. Then when I loaded that table in I could use pivot in powerBI, using the new rowcount column as the column names and choosing not to aggregate the values.

 

Sorry if I wasted anyone's time and hopefully it will help someone else out.

 

Best

 

Steve

View solution in original post

1 REPLY 1
SteveIOW
Helper II
Helper II

Hah - I've done it.

I created a column in the SQL using ROWCOUNT and PARTITION. Then when I loaded that table in I could use pivot in powerBI, using the new rowcount column as the column names and choosing not to aggregate the values.

 

Sorry if I wasted anyone's time and hopefully it will help someone else out.

 

Best

 

Steve

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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