Forum Discussion

mrasenberg's avatar
mrasenberg
Regular Visitor
9 years ago
Solved

Dynamically generate table rows for each row

Hi all,

 

Being quite new to Power Bi, I'm reaching out to this community. 

 

What I'm trying to achieve is to dynamically generate table rows for each date in a date range. 

 

The source:

 

Id	StartDate	EndDate	DateDifference
7069	01-11-2016	04-11-2016	3
7070	01-11-2016	04-11-2016	3
7071	31-10-2016	04-11-2016	4
7072	06-11-2016	11-11-2016	5

 

The result should be a row for each date between the StartDate and EndDate.

 

I was looking for a Power Query solution but that didn't worked out (by me). 

 

Anyone a hint or solution?

 

Thanks in advance!

 

Kind regards,

Maarten Rasenberg

 

  • ImkeF's avatar
    ImkeF
    9 years ago

    By expanding the list-column that has been generated : The last column "Custom" has been created by the formula -> you see the list and expand it with the double-arrow in the headers:

     

11 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    So, would your expected result be:

     

    01-11-2016     7069
    02-11-2016     7069
    03-11-2016     7069
    04-11-2016     7069
    01-11-2016     7070
    02-11-2016     7070
    03-11-2016     7070
    04-11-2016     7070
    31-10-2016     7071
    01-11-2016     7071
    02-11-2016     7071
    03-11-2016     7071
    04-11-2016     7071
    06-11-2016     7072
    07-11-2016     7072
    08-11-2016     7072
    09-11-2016     7072
    10-11-2016     7072
    11-11-2016     7072

    If not, please provide what you are looking to achieve.

    • mrasenberg's avatar
      mrasenberg
      Regular Visitor

      Hi Smoupre,

       

      That is correct!

       

      Regards,
      Maarten

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        OK, well that was the easy part, now I'll have to try to figure out how to accomplish it!

  • This topic really saved my day, critical customer need got solved "on the hour", thanks! :)