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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
palpeti21
Frequent Visitor

Lookup table that changes over time

Can you please help me how do I design my model so I can make the below work:

 

I have sales data in the fact table and I have customer data in the lookup table. The customer data contains customer addresses. The address for the same customer ID could be different today than it was a month ago. 

 

I need to be able to tell each transactions in city 'A' a month ago, and  today. Also, I need to be able to tell what were the transaction items made to customers who had their address changed between today and a month ago (or between any two points in time).

 

What is the best way to design the tables and relations to make this model work?

 

Many Thanks,

 

1 ACCEPTED SOLUTION


@palpeti21 wrote:

Thanks, this is very helpful. I will probably need to use Type 2 - Row Versioning. My next issue then is with this method I will no longer be able to use the customer ID, I'll need to use the Surrogate Key to connect to my fact table. I don't have a match for these in the fact table though...


You are right. You will need a surrogate key and your fact table ETL (extract, transform, load) process also needs to be modified to populate the right surrogate key in the fact table.

 

If your question has been answered, please mark the post as answered.

 

View solution in original post

3 REPLIES 3
palpeti21
Frequent Visitor

Thanks, this is very helpful. I will probably need to use Type 2 - Row Versioning. My next issue then is with this method I will no longer be able to use the customer ID, I'll need to use the Surrogate Key to connect to my fact table. I don't have a match for these in the fact table though...


@palpeti21 wrote:

Thanks, this is very helpful. I will probably need to use Type 2 - Row Versioning. My next issue then is with this method I will no longer be able to use the customer ID, I'll need to use the Surrogate Key to connect to my fact table. I don't have a match for these in the fact table though...


You are right. You will need a surrogate key and your fact table ETL (extract, transform, load) process also needs to be modified to populate the right surrogate key in the fact table.

 

If your question has been answered, please mark the post as answered.

 

Shahfaisal
Solution Sage
Solution Sage

My advice is to handle this in your Data Warehouse. This scenario is called Slowly Changing Dimension Type 2 and here is an article for you to get up to speed - https://adatis.co.uk/introduction-to-slowly-changing-dimensions-scd-types/

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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