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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
pcav
Helper I
Helper I

Split a single row into multiple rows

I would be grateful for any assistance with my latest challenge in PowerBI/PowerQuery

 

I have a table that records engineer recurring activities on a single row with a start and end date .....

 

rec1.PNG

 

I need to extrapolate these to another table with one row per engineer per day per activity, like so ...

 

rec2.PNG

I've been struggling with this for days ...

 

Thanks

 

 

1 ACCEPTED SOLUTION

Thank for the reply.  In the end I actualy resolved this ... I discovered CROSSJOIN and CALENDER and used these to dynamically create the new table in DAX

View solution in original post

2 REPLIES 2
elJukes
Helper I
Helper I

Hi Pcav

 

You could try adding an extra column in the Query Editor using this formulae:

Table.AddColumn(#"Previous Step","Date", each {Number.From([StartDate])..Number.From([EndDate])})

That will create a list of all the dates between your start and end (inclusive). You can then expand the column out using the little icon in it's header and it'll create a row per person per day. Once you've expended the Date column out you'll need to format it as a date otherwise it'll look like a bunch of numbers - those numbers are actually date codes.

Thank for the reply.  In the end I actualy resolved this ... I discovered CROSSJOIN and CALENDER and used these to dynamically create the new table in DAX

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.