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
Anonymous
Not applicable

'Flipping' a horizontal fact table into a vertical fact table

This is a bit of a weird one to explain, but here goes.

 

I'm trying to visualise some timelines using either Timeline by Queryon or Timeline Storyteller.

 

It appears for both of these custom visuals, the data that needs to be provided should be in this format:

 

TABLE A

Case FileMilestoneDate
CS1Query 1 
CS1Query 2 
CS1Query 3 
CS1Query 4 
CS1Query 5 
CS1Info Request 1 
CS1Info Request 2 
CS1Info Request 3 
CS1Closed 
CS2Query 1 
CS2Query 2 
CS2Query 3 
CS2Query 4 
CS2Query 5 
CS2Info Request 1 
CS2Info Request 2 
CS2Info Request 3 
CS2Closed 
CS3Closed 
CS3Query 1 
CS3Query 2 
CS3Query 3 
CS3Query 4 
CS3Query 5 
CS3Info Request 1 
CS3Info Request 2 
CS3Info Request 3 
CS3Closed 

 

However, the data that is being collected by users on the project I am working on is in this format:

TABLE B

Case FileQuery 1Query 2Query 3Query 4Query 5Info Request 1Info Request 2Info Request 3Closed
CS101/01/202110/01/202123/01/202124/01/202131/01/202103/01/202112/01/202125/01/202101/02/2021
CS202/01/202111/01/202124/01/202125/01/202101/02/202104/01/202113/01/202126/01/202102/02/2021
CS303/01/202112/01/202125/01/202126/01/202102/02/202105/01/202114/01/202127/01/202103/02/2021

 

The Case File column contains a unique reference for each case file, so it's also used as a dimension table to form relationships with other sets of data.

 

Is there a way of converting Table B into Table A using powerquery?

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Select the first column and 'Unpivot other columns'

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

Select the first column and 'Unpivot other columns'

Anonymous
Not applicable

O.M.G. Thank you so much, this works!

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 Kudoed Authors