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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
RaptorFox
Frequent Visitor

Convert dynamic amount of date rows to columns

Dear community

 

I have multiple CSV blobs in a particular storage container. Those are pulled from our backup system once a week for the last seven days. Each row indicates the system to be backed up, and then n-amount of date-named columns show if the backup was successful on this particular date (1) or not (0).

 

situation_display.jpg

 

I need to be able to use date slicers in my dashboard and provide an easy overview. Therefore, i need one row per system per date for the dynamic amount of dates (columns) like this:

 

situation_display_target.jpg

 

I now tried 3 hours, and need to give up. How can i do this conversion in the easiest way?

 

Thank you very much for any help! 

1 ACCEPTED SOLUTION
AlexanderPrime
Solution Supplier
Solution Supplier

Hi there. 

Have you tried in Power Query selecting all the columns except the System Column and then using the "Unpivot Columns" function?

Doing that should give you an output like this:

 

AlexanderPrime_0-1656053074013.png

Then you'd just need to rename the 2 columns it created and you should be good to go. 


Please note - I am not affiliated with Microsoft, I'm just an end user like yourself.
Just a regular guy doin' Data Science.

If my post has helped you, please don't forget to thumbs up or click "Accept as solution" if it solved your problem!

View solution in original post

2 REPLIES 2
RaptorFox
Frequent Visitor

Thank you very much, it worked perfectly! 

AlexanderPrime
Solution Supplier
Solution Supplier

Hi there. 

Have you tried in Power Query selecting all the columns except the System Column and then using the "Unpivot Columns" function?

Doing that should give you an output like this:

 

AlexanderPrime_0-1656053074013.png

Then you'd just need to rename the 2 columns it created and you should be good to go. 


Please note - I am not affiliated with Microsoft, I'm just an end user like yourself.
Just a regular guy doin' Data Science.

If my post has helped you, please don't forget to thumbs up or click "Accept as solution" if it solved your problem!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors