Forum Discussion
Modeling slowly changing dimensions
- 4 years ago
In this scenario, you can add an independent Dim Date table to the model, which is disconnected to all these 3 dimension tables. Then put date column from Date table into a slicer visual, use measures to get corresponding values from each dimension table by comparing the selected date in slicer with validFrom/validTo dates in each dimension table.
For example, you can use a measure like below to get info from Person table.
PersonInfo = VAR vSelectedDate = SELECTEDVALUE ( 'Date'[Date] ) RETURN MAXX ( FILTER ( Person, Person[validFrom] <= vSelectedDate && Person[validTo] > vSelectedDate ), Person[info] )Or you can refer to below videos and articles to get more ideas about how to deal with SCD.
Slowly Changing Dimensions in Power BI - YouTube
Working with Slowly Changing Dimensions in Power BI - YouTube
https://p3adaptive.com/2019/06/how-can-i-get-a-lookup-table-from-a-slowly-changing-dimension-scd/
MSPTDA 35: Power BI & DAX Formula for Data Modeling with a Slowly Changing Dimensions - YouTube
MSPTDA 34: Data Modeling for Slowly Changing Dimensions with Power Query & Power Pivot - YouTube
Hope they are helpful.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
In this scenario, you can add an independent Dim Date table to the model, which is disconnected to all these 3 dimension tables. Then put date column from Date table into a slicer visual, use measures to get corresponding values from each dimension table by comparing the selected date in slicer with validFrom/validTo dates in each dimension table.
For example, you can use a measure like below to get info from Person table.
PersonInfo =
VAR vSelectedDate = SELECTEDVALUE ( 'Date'[Date] )
RETURN
MAXX (
FILTER (
Person,
Person[validFrom] <= vSelectedDate
&& Person[validTo] > vSelectedDate
),
Person[info]
)
Or you can refer to below videos and articles to get more ideas about how to deal with SCD.
Slowly Changing Dimensions in Power BI - YouTube
Working with Slowly Changing Dimensions in Power BI - YouTube
https://p3adaptive.com/2019/06/how-can-i-get-a-lookup-table-from-a-slowly-changing-dimension-scd/
MSPTDA 35: Power BI & DAX Formula for Data Modeling with a Slowly Changing Dimensions - YouTube
MSPTDA 34: Data Modeling for Slowly Changing Dimensions with Power Query & Power Pivot - YouTube
Hope they are helpful.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.