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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
hholtshopple
Frequent Visitor

Join to Date table and Replicate

Hello,

 

I have received a data set that is grouped by date, each row has a start date and an end date among other key identifiers. I want to ungroup by date these in order to give a count on each day. However instead of just a static count, I want to replicate each day grouped by key characteristics. This would create a new table instead of just a column on the date table. Each entry would have a day and then be grouped by key characteristics. I think I need to do a join with a date table but from there I am lost. 

 

Ive made an example table of what I am trying to do:

 

This is the orginal table

data table.PNG

 

This is what Im trying to get at, ive only included a few dates but ideally this would populate over the entire month of Febuary in this example. For my actual data set it would be crated over the entirity of the data set\.

data table 2.PNG

 

Here is the text from the first table:

NameStart DateEnd DateCarState
Pete2/1/20182/15/2018CivicCalifornia
Samson2/1/20182/28/2018CivicTexas
Edgar2/15/20182/18/2018AccordTexas
Pete2/16/20182/22/2018AccordTexas
Edgar2/19/20182/22/2018CivicTexas
Sarah2/1/20182/15/2018OdessyWyoming

 

Thank you in advance!!

 

-Hunter

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Hunter,

 

Please download the demo from the attachment.

Table =
SELECTCOLUMNS (
    FILTER (
        CROSSJOIN ( 'Calendar', 'Table1' ),
        'Calendar'[Date] >= Table1[Start Date]
            && 'Calendar'[Date] <= Table1[End Date]
    ),
    "Date", [Date],
    "Car", [Car],
    "State", [State]
)

Join-to-Date-table-and-Replicate

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Hunter,

 

Please download the demo from the attachment.

Table =
SELECTCOLUMNS (
    FILTER (
        CROSSJOIN ( 'Calendar', 'Table1' ),
        'Calendar'[Date] >= Table1[Start Date]
            && 'Calendar'[Date] <= Table1[End Date]
    ),
    "Date", [Date],
    "Car", [Car],
    "State", [State]
)

Join-to-Date-table-and-Replicate

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you! Will implement this method on my data table. 

 

-Hunter

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.