Skip to main content

Power BI

Under Review

DatesInPeriod () function accepts it's first parameter as "Date" only with default 12:00:00AM timestamp. What about for different time?

Vote (17) Share
Manjunath Hireholi's profile image

Manjunath Hireholi on 12 Jan 2015 20:10:29

https://social.technet.microsoft.com/Forums/en-US/b6ccbaf4-cd8d-4bb7-993c-8d088b44adf8/disconnected-slicer-in-powerview-hour-day-week-month-year-max?forum=powerview#b6ccbaf4-cd8d-4bb7-993c-8d088b44adf8

Administrator on 24 Jan 2015 06:32:19

Thanks for the suggestion Manjunath. Who else would find this useful? Please add your vote if you think it is!

Comments (3)
Manjunath Hireholi's profile image Profile Picture

Shawn Eary on 06 Jul 2020 00:14:24

RE: DatesInPeriod () function accepts it's first parameter as "Date" only with default 12:00:00AM timestamp. What about for different time?

I think it would be useful to me if you not only allowed datesInPeriod to accept timeStamp values but also allowed the interval parameter to support "hour" resolution.

Right now, I think the best resolution available is "day".

I have a situation where I am computing the the number of times something happened in the last few hours. camargos88 gave me some DAX that worked, but I think it's broke now and it's not entirely intuitive to read. Enhancing the DatesInPeriod function to work with hours might make the DAX more readable and easier to maintain:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Sum-of-Failures-Last-Hour/td-p/1037662
The above forum post is a fictional example of a real problem I am dealing with. It's actually far easier to compute the Sum of Failures (within the last few hours) using a language other than DAX, but DAX is what Power BI offers...

Manjunath Hireholi's profile image Profile Picture

Manjunath Hireholi on 05 Jul 2020 21:58:12

RE: DatesInPeriod () function accepts it's first parameter as "Date" only with default 12:00:00AM timestamp. What about for different time?

This is a very useful feature that allows users to drill down to Hour, Minute and seconds level to see what's happening with the data. Please add this at the earliest. Thanks.

Manjunath Hireholi's profile image Profile Picture

Manjunath Hireholi on 05 Jul 2020 21:57:44

RE: DatesInPeriod () function accepts it's first parameter as "Date" only with default 12:00:00AM timestamp. What about for different time?

http://stackoverflow.com/questions/27498880/minute-hour-day-week-month-year-filter-for-power-view-charts-in-powe?answertab=active#tab-top


looking for

Minute
Hour
Day
Week
Month
Year
Max

Filters in Power View charts.