Bucketing Order Hour and Attended Hour

I want to do some more bucketing, but not sure how I can make it work. 

We want to look at mobile sales for our General Admissions. All our sales are currently through TNEW. The only thing I could come up with would be to try to group things by the time between [Order Hour] and [Attended Hour].

However, when I try to bucket things (something like 

 )

it won't let me use flat Order Hour. It keeps pre-totaling things. I want to say: "Show me the count of tickets where [Attended Hour] is equal to [Order Hour]", or "Show me how many people bought tickets and then visited within an hour".

How could I make this happen?

Parents
  • HI Nathanael,

    Some flavor of the following may work for you... grouping by SLI ID (so a per-ticket evaluation), if the attended hour = order hour, then add 1 to the SUM, else 0 or NULL. 

    SUM( [SLI ID] ,
    IF ( MAX( [Attended Hour] - [Order Hour] ) = 0 
    , 1 , NULL ) )

    This will not count an order at 59 minutes after the hour that attended 1 minute later. We could change it to bucket orders that attended in the same or next hour, but it's a trade off, as an order at 10:01am that attended at 11:59am would be counted.

    SUM( [SLI ID] ,
    IF ( MAX( [Attended Hour] - [Order Hour] ) >= 0
    AND MAX( [Attended Hour] - [Order Hour] ) <= 1
    , 1 , NULL ) )

Reply
  • HI Nathanael,

    Some flavor of the following may work for you... grouping by SLI ID (so a per-ticket evaluation), if the attended hour = order hour, then add 1 to the SUM, else 0 or NULL. 

    SUM( [SLI ID] ,
    IF ( MAX( [Attended Hour] - [Order Hour] ) = 0 
    , 1 , NULL ) )

    This will not count an order at 59 minutes after the hour that attended 1 minute later. We could change it to bucket orders that attended in the same or next hour, but it's a trade off, as an order at 10:01am that attended at 11:59am would be counted.

    SUM( [SLI ID] ,
    IF ( MAX( [Attended Hour] - [Order Hour] ) >= 0
    AND MAX( [Attended Hour] - [Order Hour] ) <= 1
    , 1 , NULL ) )

Children