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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hnsbhat
Helper I
Helper I

Help needed for Data Transformation in Powerquery

Hi, I have a data table with Names, start date of the week, end date of the week and hours for each week day in columns. I need to transpose this table to get date-wise hours for each name. Itries unpivot columns, but it gives same headings for each date in rows, I am not able to figure out how to get dates in between the week starts and week ending.

 

Below are the input table and expected output. Is there a way to do this in Powerquery? Thanks for your help.

 

Input

 

NameStart DateEnd DateMonday HoursTuesday HoursWednesday HoursThursday HoursFriday HoursSaturday HoursSunday Hours

ABC5/2/201811/2/20188888000
ABC12/2/201818/2/20188888800
XYZ5/2/201811/2/20188444400
XYZ12/2/201818/2/20180008800

 

Expected Output - 

 

NameDateHours
ABC5/2/20188
ABC6/2/20188
ABC7/2/20188
ABC8/2/20188
ABC9/2/20180
ABC10/2/20180
ABC11/2/20180
ABC12/2/20188
ABC13/2/20188
ABC14/2/20188
ABC15/2/20188
ABC16/2/20188
ABC17/2/20180
ABC18/2/20180
XYZ5/2/20188
XYZ6/2/20184
XYZ7/2/20184
XYZ8/2/20184
XYZ9/2/20184
XYZ10/2/20180
XYZ11/2/20180
XYZ12/2/20180
XYZ13/2/20180
XYZ14/2/20180
XYZ15/2/20188
XYZ16/2/20188
XYZ17/2/20180
XYZ18/2/20180

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@hnsbhat

 

Hi, please check the video.

 

 

This is the PBIX File

 

PBIX File

 

Regards

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@hnsbhat

 

Hi, please check the video.

 

 

This is the PBIX File

 

PBIX File

 

Regards

 

Victor

Lima - Peru




Lima - Peru

Great, it works. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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