Forum Discussion
Struggling with creating correct data model - help please!
- Anonymous2 years ago
Hi DC2024 ,
You can create a separate dimension table for stores, products and date.
For example:
Fact Table:
Product dimension table:
Store dimension table:
Date dimension table:
DateTable = ADDCOLUMNS( CALENDAR(MIN('Fact Table'[Date]),MAX('Fact Table'[Date])), "Year",YEAR([Date]), "Quarter",ROUNDUP(MONTH([Date])/3,0), "Month",MONTH([Date]), "Day",DAY([Date]) )Create relationships between them. This is key to a functional STAR schema.
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf 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!
Hi DC2024 ,
You can create a separate dimension table for stores, products and date.
For example:
Fact Table:
Product dimension table:
Store dimension table:
Date dimension table:
DateTable = ADDCOLUMNS(
CALENDAR(MIN('Fact Table'[Date]),MAX('Fact Table'[Date])),
"Year",YEAR([Date]),
"Quarter",ROUNDUP(MONTH([Date])/3,0),
"Month",MONTH([Date]),
"Day",DAY([Date])
)
Create relationships between them. This is key to a functional STAR schema.
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
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!
- DC20242 years agoFrequent Visitor
That is fantastic, thank you very much Yang!