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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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