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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Sylvain74
Helper III
Helper III

Dealing with dates

Hello,

 

Let's say in my data model I have 1 or more tables with multiple datecode columns (yyyymmdd). I have as well one single dim_time table.

Should I add the dim_time table as many time as I have datecode columns or should I add it only once and use "Relationship" dax instruction?

Should I create multiple calculated table based on dim_time?

What is the best practices?

I don't have any calculation based on that dates, usually I use the dim_time table just to display the date in a user friendly fashion and sometime in a slicer as well (e.g. order_date to see only purchase order in period)

 

Thanks 

Sylvain

1 ACCEPTED SOLUTION

Hi  @Sylvain74 ,

 

Yes,I think creating sereval dim_time tables would make your model look more clean and convenient.

 

Best Regards,
Kelly

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

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Sylvain74 , Hope you are checking about date and calendar table. In your calendar table you can have date and datekey

 

Datekey = format([Date], "YYYYMMDD")

 

and you can join on this or date column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak : I already have the datekey in the dim_time table. The question is not here...

Actually I am wondering what is the good practice when you have multiple date columns in your tables. Should I add multiple dim_time tables and link them respectively to each date columns?

There is no best practice here. It totally depends on what the visualisations/dashboard is doing.

 

A relationship means filtering so you might want to 2 dimensions (each in a slicer)  to filter a fact table on, say, Txn Date and Ship Date without the 2 dates filtering each other (if that makes sense)

You can read this for an introduction radacad/role-playing 

Hello HotChilli,

 

That's clear for me that if I want to filter out the Txn Date and Ship Date separately with slicers, I need to have 2 different relationships.

But for other datecodes in my fact table that I just want to display in user readable format. Should I link each of them to a specific dim_time table to get the correct format or what else?

What should I do? What is the best solution to avoid adding multiple times the dim_time table just for formating purpose?

Thanks.

Hi  @Sylvain74 ,

 

Yes,I think creating sereval dim_time tables would make your model look more clean and convenient.

 

Best Regards,
Kelly

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.