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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Maazi
Regular Visitor

Data Modelling - Dates and Periods

Sales.PNG

 

The image is a sample of Sales data in a transaction fact table (FactSales)  in my Power BI model. I have a standard DimDate table which also includes a column "FiscalPeriod" (format is YYYYMM) that repeats for all dates within a FiscalPeriod. 
I would like to

1). Create a relationship between the SalesFact and DimDate using the FactSales(SalesPeriod) and DimDate(FiscalPeriod ) columns. This however creates a many-to-many relationship and don't want to go down that route. 

2) Have a star schema rather than snowflake

3) Be able to do time intelligences calculations, like Period over Period, Previous Period etc. 

 

Any ideas on how to go about will be appreciated. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Maazi ,
Based on your description, instead of creating a relationship directly between FactSales(SalesPeriod) and DimDate(FiscalPeriod), first create a bridged table containing unique FiscalPeriods. This bridged table will act as an intermediary between FactSales and DimDate, thus avoiding many-to-many relationships. Then, make sure that your FactSales table is at the center of the schema and that the DimDate and other dimension tables are directly associated with it. The above bridging table will help maintain this star schema structure. Finally, create a one-to-many relationship between DimDate[FiscalPeriod] and BridgeFiscalPeriod[FiscalPeriod].
Create a one-to-many relationship between FactSales[SalesPeriod] and BridgeFiscalPeriod[FiscalPeriod].

 

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Maazi ,
Based on your description, instead of creating a relationship directly between FactSales(SalesPeriod) and DimDate(FiscalPeriod), first create a bridged table containing unique FiscalPeriods. This bridged table will act as an intermediary between FactSales and DimDate, thus avoiding many-to-many relationships. Then, make sure that your FactSales table is at the center of the schema and that the DimDate and other dimension tables are directly associated with it. The above bridging table will help maintain this star schema structure. Finally, create a one-to-many relationship between DimDate[FiscalPeriod] and BridgeFiscalPeriod[FiscalPeriod].
Create a one-to-many relationship between FactSales[SalesPeriod] and BridgeFiscalPeriod[FiscalPeriod].

 

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi @Anonymous 
Thanks, that was helpful. 

Maazi
Regular Visitor

 Hi @MFelix 

Many thanks for your reply. The Sales Fact needs to be at the Period level. I have had a workaround to this by doing the following; 

1.) Create a table (DimPeriod) of distinct list of all the Periods from the DimDate table

2) I have created a one-to- many relationship between DimPeriod(Period) to SalesFact(SalesPeriod)

3) In other to use time intelligence, I have also created a one-to-many relationship between DimPeriod (Period) and DimDate(Period)

 

I have attached a graphical representation of this design. Problem is it's a a snowflake schema rather than a star schema although it seems to be working as expected. Is there any way to design this into a Star schema ? Model.PNG

MFelix
Super User
Super User

Hi @Maazi ,

 

For this to work has a star schema since you have the Sales granularity at Fiscal Period level your calendar table should have the same granularity, and not a dimension table.

 

Another option can be to introduce a date in the sales like the end or the start of the fiscal period so you can connect the date with the fact table by date allowing you to do the calculations for time intelligence.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors