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
Anonymous
Not applicable

Modelling Date and Times , with Durations and exceeded targets etc

Hi all,

 

I have  requirement to handle lots of dates and times.

 

So an initial fact table will include such as

Recorded Date (and time)

Target Date (and time)

Completed Date (and time)

Original Target Date    (and time)

Appointment Date (and time)

all with realtionships to date table. Thats fine.            

A requirement will be durations - so durations in days , or hours or mins bewteen dates.

ie

Recorded Date to Completed Date

Target Date to Completed Date

Etc

 

Would you put all these time columns in the fact table. And even precalculate these durations in a fact table. Or use measures sumx and related to work out durations , date targets met or exceeded.

How would I store say the recorded date/time , so a self service person could easily incude that in their reports.

 

Any pointers or articles on this would be gratefully received. Thanks

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

You can try like

new column = datediff([Recorded Date],[Completed Date],Day)

new meausre= Averagex(Table,datediff([Recorded Date],[Completed Date],Day))

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

You can try like

new column = datediff([Recorded Date],[Completed Date],Day)

new meausre= Averagex(Table,datediff([Recorded Date],[Completed Date],Day))

 

Anonymous
Not applicable

Thanks - after reading some sqlbi where they have stored the duration in the fact table. And some Kimball where they have stored times in teh fact table for now I will go with that method. Reducing my columns to only what strictly needed. Thanks

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.