I'm trying to calculated the Top 3 categories of tasks using DAX, the dataset get updated every 15 minutes, is there any function in DAX can calculate the count of rows between a datetime and current time.
Please take a look to the my dataset, I have the table bellow called Tasks.
I have tried the DAX code bellow but it only calculate the TOP 3 on the current day and not by the last hour.
TOP_3 =
CALCULATE (
COUNT ( Tasks[id_task] ),
FILTER (
Tasks,
(
DATEDIFF (
Tasks[Start DateTime],
TODAY (),
HOUR
) <= 1
)
)
)
So need your guys help in cracking a solution. Thanks in advance.