March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I need to model a scd2… Where, I would like to display in one page data based on current client, and in another based on the details of the client at the time it occurred.
I have modeled it this way...
First the data:
Fact
Sale | Client Skey | ClientEkey |
345 | 1 | 1 |
341534 | 2 | 1 |
531 | 3 | 1 |
3145 | 4 | 1 |
3145 | 5 | 2 |
5789876543 | 6 | 2 |
342 | 7 | 2 |
44 | 8 | 2 |
Client
Client | Client Skey | ClientEkey | Valid |
the facebook | 1 | 1 | 0 |
fbook | 2 | 1 | 0 |
facebook inc | 3 | 1 | 0 |
meta | 4 | 1 | 1 |
A | 5 | 2 | 0 |
Adidas | 6 | 2 | 0 |
Adidas inc | 7 | 2 | 0 |
Adidas int | 8 | 2 | 1 |
Both tables are connected through ClientSkey.
Then what I did in my model is just a dax code to consume/create:
Client Current (its just a subset of Client)
Client Current | Client Skey | ClientEkey | Valid |
meta | 4 | 1 | 1 |
Adidas int | 8 | 2 | 1 |
and connect to Fact table throuh ClientEkey.
Is the model below correct then??
fact <---- Client (SKey)
fact <---- Client Current (Ekey)
Solved! Go to Solution.
Hi @ovonel ,
Are the [Client Skey] values in both tables unique? Why not create a dimension table similar to the one in the yellow box to join to both tables separately? That way, the [ClientEkey] field does not need to appear in both tables.
Good modeling is half of the success, please refer to:
Understand star schema and the importance for Power BI
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @ovonel ,
Are the [Client Skey] values in both tables unique? Why not create a dimension table similar to the one in the yellow box to join to both tables separately? That way, the [ClientEkey] field does not need to appear in both tables.
Good modeling is half of the success, please refer to:
Understand star schema and the importance for Power BI
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
I need to model a scd2… Where, I would like to display in one page data based on current client, and in another based on the details of the client at the time it occurred.
I have modeled it this way...
First the data:
Fact
Sale | Client Skey | ClientEkey |
345 | 1 | 1 |
341534 | 2 | 1 |
531 | 3 | 1 |
3145 | 4 | 1 |
3145 | 5 | 2 |
5789876543 | 6 | 2 |
342 | 7 | 2 |
44 | 8 | 2 |
Client
Client | Client Skey | ClientEkey | Valid |
the facebook | 1 | 1 | 0 |
fbook | 2 | 1 | 0 |
facebook inc | 3 | 1 | 0 |
meta | 4 | 1 | 1 |
A | 5 | 2 | 0 |
Adidas | 6 | 2 | 0 |
Adidas inc | 7 | 2 | 0 |
Adidas int | 8 | 2 | 1 |
Both tables are connected through ClientSkey.
Then what I did in my model is just a dax code to consume/create:
Client Current (its just a subset of Client)
Client Current | Client Skey | ClientEkey | Valid |
meta | 4 | 1 | 1 |
Adidas int | 8 | 2 | 1 |
and connect to Fact table throuh ClientEkey.
Is the model below correct then??
fact <---- Client (SKey)
fact <---- Client Current (Ekey)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |