Forum Discussion
Joe_T
2 years agoRegular Visitor
Title: Seeking Help: Creating Dynamic Measures Based on Time Intervals
Hi Power BI Community, I'm reaching out to seek assistance with creating dynamic measures in Power BI based on time intervals. Context: I have a dataset named "TIM Tracker (New)" containing informa...
amitchandak
2 years agoSuper User
Joe_T , You have to create a static interval as column and use that in slicer
Try a new column like
30 Min Interval =
VAR BaseTime = TIMEVALUE('Table'[DateTimeColumn])
VAR TotalHoursSinceMidnight = HOUR(BaseTime) + MINUTE(BaseTime) / 60.0
VAR RoundedHours = FLOOR(TotalHoursSinceMidnight, 0.5)
RETURN
BaseDate + TIME(HOUR(RoundedHours), MINUTE(RoundedHours * 60), SECOND(0))
Joe_T
2 years agoRegular Visitor
amitchandak Thanks for the reply i apprciate your help. This is a solution for part of my query, the part i'm still unsure about relates to visualy presenting this data in a Gantt style chart so durations can be seen across a 24 hour day. I don't know if you can help- i can do this in excel, just not power bi