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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
ovonel
Post Prodigy
Post Prodigy

how to model scd2?

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

SaleClient SkeyClientEkey
34511
34153421
53131
314541
314552
578987654362
34272
4482

 

 

 

Client

ClientClient SkeyClientEkeyValid
the facebook110
fbook210
facebook inc310
meta411
A520
Adidas620
Adidas inc720
Adidas int821

 

 

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 CurrentClient SkeyClientEkeyValid
meta411
Adidas int821

 

and connect to Fact table throuh ClientEkey.

 

 

Is the model below correct then??

 

fact <---- Client       (SKey)

fact <---- Client Current     (Ekey)

 

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

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.

vcgaomsft_0-1662714608297.png

 

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

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

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.

vcgaomsft_0-1662714608297.png

 

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

ovonel
Post Prodigy
Post Prodigy

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

SaleClient SkeyClientEkey
34511
34153421
53131
314541
314552
578987654362
34272
4482

 

 

 

Client

ClientClient SkeyClientEkeyValid
the facebook110
fbook210
facebook inc310
meta411
A520
Adidas620
Adidas inc720
Adidas int821

 

 

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 CurrentClient SkeyClientEkeyValid
meta411
Adidas int821

 

and connect to Fact table throuh ClientEkey.

 

 

Is the model below correct then??

 

fact <---- Client       (SKey)

fact <---- Client Current     (Ekey)

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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