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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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