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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
rjose
Frequent Visitor

Data modeling with date, time & time period dim tables

Hi,

I want to create a Power BI model with date (calendar), time (hours) & Timeperiod (YTD, MTD etc.). Below is the current structure, calendar & time table are connected to fact tables. I'm not able to make the relationship b/w Time & Timeperiod bidirectional. This is messing up the last year calculations using dateadd. What would be the best way to model this data?

rjose_0-1673905321966.png

 

8 REPLIES 8
bolfri
Super User
Super User

Based on what you said:


@rjose wrote:

I want to create a Power BI model with date (calendar), time (hours) & Timeperiod (YTD, MTD etc.). 

I thought the Timeperiod is a table that agreggates dates to dynamic calculations.

 

Without sample data (even few rows and expected results showed in excel/paint) it's hard to say what model would be best for your scenario. Can you provide this pbix file with those table and few rows from fact table?





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

Proud to be a Super User!




rjose
Frequent Visitor

Sample.PNG

Hi, can you share excel file with sample data like you've shown it on screenshot? 🙂





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

Proud to be a Super User!




rjose
Frequent Visitor

I'm not able to attach the file to this thread 😞 It says .xlsx is not supported

You can use https://wetransfer.com/ and give a link here.





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

Proud to be a Super User!




rjose
Frequent Visitor

I have the sample file in my work laptop and my organization doesn't allow use of external file sharing services

bolfri
Super User
Super User

Why Time table is connected to Timesperiod? YTD i MTD it's bassicly a period names that should be connected to Calendar only. What am I missing here?





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

Proud to be a Super User!




rjose
Frequent Visitor

I need time period to start at particular hours for events. For example, event A is from Jan 10 6 PM to Jan 15 11:59 PM. Wasn't able to capture this without having time in 'Timeperiod' table  

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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