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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ANM_97
Helper IV
Helper IV

Data Modeling - Customers

Hi,

 

Hello,

I have the DIM_CUSTOMERS table, which is populated based on the CURRNO column that represents the customer's version. When an attribute in the source application changes, a new CURRNO appears, and a new DIM_CUSTOMER_ID key is inserted with the date_from (modification date) and date_to as null.

The current request requires bringing attributes to the customer level that may change more rapidly than the customer's version. For example, whether or not they have marketing consent.

How can I model the data so that I can see the complete picture of the customer on a specific day?

Example: Customer 200142025 has 59 versions, the last version is valid from 31.05.2024 to the present. However, during this period, they changed their marketing consent from YES to NO on 15.08.2024.

How can I model the data so that I can see the complete and correct picture of the customer on any given date?


DIM_CUSTOMERS:


DIM_CUSTOMER_IDCURRNOCUSTOMER_IDDATE_FROMDATE_TO
1387978612001420253/7/17 17:293/8/17 0:10
1387979722001420253/8/17 0:104/7/17 3:33
1387980832001420254/7/17 3:334/27/17 13:00
1387981242001420254/27/17 13:009/21/17 12:53
1387981352001420259/21/17 12:5310/4/17 10:26
13879814620014202510/4/17 10:2610/4/17 10:26
13879815720014202510/4/17 10:262/27/18 10:52
1387981682001420252/27/18 10:522/28/18 8:18
1387981792001420252/28/18 8:183/7/18 18:27
13879787102001420253/7/18 18:275/26/18 12:45
13879788112001420255/26/18 12:457/26/18 16:23
13879789122001420257/26/18 16:237/26/18 16:24
13879790132001420257/26/18 16:247/26/18 17:05
13879791142001420257/26/18 17:057/27/18 17:19
13879792152001420257/27/18 17:198/2/18 18:34
13879793162001420258/2/18 18:348/6/18 10:18
13879794172001420258/6/18 10:181/11/19 16:05
13879795182001420251/11/19 16:051/15/19 17:48
13879796192001420251/15/19 17:483/2/19 12:41
13879798202001420253/2/19 12:414/12/19 7:28
13879799212001420254/12/19 7:2810/1/19 17:38
138798002220014202510/1/19 17:3810/2/19 10:48
138798012320014202510/2/19 10:4811/6/19 9:37
138798022420014202511/6/19 9:372/28/20 1:58
13879803252001420252/28/20 1:583/31/20 1:50
13879804262001420253/31/20 1:505/29/20 1:39
13879805272001420255/29/20 1:396/2/20 15:22
13879806282001420256/2/20 15:227/31/20 1:36
13879807292001420257/31/20 1:368/8/20 15:02
13879809302001420258/8/20 15:029/30/20 2:11
13879810312001420259/30/20 2:1110/3/20 17:05
138798113220014202510/3/20 17:0512/18/20 8:46
1845783320014202512/18/20 8:464/29/21 18:19
15945479342001420254/29/21 18:194/29/21 18:19
15945480352001420254/29/21 18:195/4/21 8:54
15952414362001420255/4/21 8:545/18/21 10:56
16013087372001420255/18/21 10:567/30/21 2:10
16368237382001420257/30/21 2:108/31/21 2:25
16517819392001420258/31/21 2:259/30/21 2:48
16784554402001420259/30/21 2:484/4/22 12:41
18108380412001420254/4/22 12:415/2/22 17:31
18366546422001420255/2/22 17:315/2/22 17:32
18366547432001420255/2/22 17:325/31/22 5:09
18539691442001420255/31/22 5:096/29/22 19:02
18693112452001420256/29/22 19:026/30/22 3:39
18693113462001420256/30/22 3:397/29/22 2:35
18933767472001420257/29/22 2:358/20/22 11:18
19088490482001420258/20/22 11:189/1/22 18:19
19264568492001420259/1/22 18:1911/29/22 2:38
198362215020014202511/29/22 2:383/31/23 3:11
20509038512001420253/31/23 3:114/28/23 4:15
20647689522001420254/28/23 4:156/30/23 3:27
20952134532001420256/30/23 3:278/31/23 4:06
21249742542001420258/31/23 4:0610/10/23 14:07
214559085520014202510/10/23 14:0710/31/23 4:54
215616085620014202510/31/23 4:542/29/24 5:46
22197406572001420252/29/24 5:463/29/24 4:39
22338088582001420253/29/24 4:395/31/24 4:45
22674290592001420255/31/24 4:45NULL


Marketing agreement "YES" until 15.08.2024 and "NO" after.

Thank you! ~~


2 REPLIES 2
Anonymous
Not applicable

Hi,@ANM_97 .I am glad to help you.
According to your description, you are having some problems designing your data model.
Although I'm not very good at data model design, I'd like to help you out
I think you can create a separate table specifically to record dynamic attribute changes for customers.
like this:

ATTRIBUTE_ID

CUSTOMER_ID

ATTRIBUTE_NAME

ATTRIBUTE_VALUE

DATE_FROM

DATE_TO

1

200142025

Marketing Consent

YES

2024-05-31

2024-08-15

2

200142025

Marketing Consent

NO

2024-08-15

NULL


The table is associated with your existing table through the CUSTOMER_ID field to your existing table.
You can use join query (left outer join/right outer join) to fetch the user's consolidated data
Note that this is only my suggestion to you, you need to build the appropriate data model according to your actual situation.

I hope the following information can help you.

URL:

Dimensional Modeling Techniques - Kimball Group
A Guide to Data Modeling & The Different Types of Models | Twilio Segment

vjtianmsft_0-1726547532352.png

 


I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello! Thank you for the suggestion. I think I will also add a FCT table that will connect the date dimension to the customers dimension and mini dimension.

Like this:

ANM_97_1-1726566058637.png

 





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.