Forum Discussion

Chris_1996's avatar
Chris_1996
Icon for Helper I rankHelper I
6 years ago
Solved

Counting Events in Progress by Date/Time Hourly Intervals

I have trawled through multiple posts, forums, help pages and am yet to be able to replicate the solutions offered. The main reason is that most of the solutions count events in progress into timesl...
  • Chris_1996's avatar
    Chris_1996
    6 years ago

    Greg_DecklerSo the open tickets link that you sent through is working so far. I have been able to create a new table with the row by row line items by ID & DATE/TIME. 

     

    One issue that you might be able to quickly help me with.

    Using the Table formula in the PBI file (below). It is currently not aligning the data as I wish.

     

    For instance: I have an ID that has a start time at 12/07/2018 7:50am. I want the new table to create a row item for that ID between

    TIME SLOT START: 12/07/2018 7:00am

    TIMESLOT END: 12/07/2018 8:00AM

     

    At the moment it is not associating that time within that time interval and instead, the first timestamp for that ID is the 8am-9am group.

     

    Any thoughts?

     
    "Table =
    VAR tmpTickets = ADDCOLUMNS('Tickets',"Effective Date",IF(ISBLANK([Closed Date]),TODAY(),[Closed Date]))
    VAR tmpTable =
    SELECTCOLUMNS(
        FILTER(
            GENERATE(
                tmpTickets,
                'Calendar'
            ),
            [Date] >= [Opened Date] &&
            [Date] <= [Effective Date]
        ),
        "ID",[Ticket Num],
        "Date",[Date]
    )
    RETURN tmpTable"