Power Query: Joining On Date Ranges

Reza Rad shows how to build merge joins between date ranges in Power Query:

Customer’s table has the history details of changes through the time. For example, the customer ID 2, has a track of change. John was living in Sydney for a period of time, then moved to Melbourne after that.

The problem we are trying to solve is to join these two tables based on their customer ID, and find out the City related to that for that specific period of time. We have to check the Date field from Sales Table to fit into FromDate and ToDate of the Customer table.

This is a common type 2 SCD scenario.  I’d be concerned that this solution would not work with large data sets which may already be pushing the size limits of the Vertipaq engine.

Related Posts

Joining Tables In DAX

Marco Russo bridges a gap in moving from SQL to DAX: The SQL language offers the following types of JOIN: INNER JOIN OUTER JOIN CROSS JOIN The result of a JOIN does not depends on the presence of a relationship in the data model. You can use any column of a table in a JOIN […]

Read More

Getting Month Names Given Numbers In DAX

Philip Seamark shows how to convert month numbers into names in Power BI: The most common solution I see offered is along the lines of a SWITCH statement that lists 12 conditions (one for each month).   This works, but can also be done using existing functions. While DAX lacks a dedicated function to convert a […]

Read More

Categories

August 2017
MTWTFSS
« Jul Sep »
 123456
78910111213
14151617181920
21222324252627
28293031