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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Lost_Number
Frequent Visitor

Merge based on date ranges

I am fairly new to PowerBI and really can seem to find a specific or even related solution online to my problem.

 

The issue:

 

Table1 is a list of Sales persons with Start date / End date and target values

PersonStartEndTarget
SP110/01/202301/12/202310000
SP215/04/202319/05/2023100
SP301/01/202331/08/2023315

 

Table2 is a list of dates that starts from the List.Min(Start) to List.Max(End) of Table1.

 

I need to merge Table2 to Table1 but for every date (row level) in Table2 for each sales person within each start to end range.

 

the output would end up showing a row for every date in Table2 duplicated for each sales person between their respective Start and End date.

 

I have already played around with merge and creating additional join columns but I can't seem to get the correct output. I know this can also be done with Dax using crossjoin and filter but I have to build this into power query.

 

Thanks in advance

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

 

I need to merge Table2 to Table1 

 

You don't need to do that. Merges are bad for your health.

 

Let the data model do the work for you. Worst case use GENERATESERIES and INTERSECT in DAX to solve this.

 

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

 

I need to merge Table2 to Table1 

 

You don't need to do that. Merges are bad for your health.

 

Let the data model do the work for you. Worst case use GENERATESERIES and INTERSECT in DAX to solve this.

 

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Thank you for the info - sadly I went the merge route.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.