Forum Discussion

stvn43's avatar
stvn43
Frequent Visitor
4 years ago
Solved

Countx w/ Date Filter

I created this measure to count the number of media arriving for every last hour, but the count isn't accurate. My thinking was to capture the current date/time - 1 hour and simply count the rows greater than that point in time, which should show the current number of arrivals. 
Any help is much appreciated.
 
Hourly Arrival Rate =
VAR AsperaIngestWindow =
NOW() - (1/24)
RETURN
COUNTX(FILTER(AsperaUploads,AsperaUploads[CreateDate] > AsperaIngestWindow), AsperaUploads[SessionID])
 
 
  • stvn43 , Try if this can help

     

    Hourly Arrival Rate =
    VAR AsperaIngestWindow =
    NOW() - time(1,0,0)
    RETURN
    COUNTX(FILTER(AsperaUploads,AsperaUploads[CreateDate] > AsperaIngestWindow), AsperaUploads[SessionID])

2 Replies

  • stvn43 , Try if this can help

     

    Hourly Arrival Rate =
    VAR AsperaIngestWindow =
    NOW() - time(1,0,0)
    RETURN
    COUNTX(FILTER(AsperaUploads,AsperaUploads[CreateDate] > AsperaIngestWindow), AsperaUploads[SessionID])

  • stvn43's avatar
    stvn43
    Frequent Visitor

    That worked, but not sure why the other failed.