Skip to main content

Hi All,

 

So I can't for the life of me figure this out.....

 

So I am trying to represent the "number of tickets" monthly by adding up the previous 12 months (or rolling twelve months) tickets per month. So for example, if I want to display the rolling 12 months for February 2019, then I would add up the ticket for March 2018 - February 2019. Then, that sum would represent the number of tickets for February.

 

I've trying to do this using calculation fields and it seems to be pulling in only the current months count, meaning it's not adding the previous months together.

 

This is the formula I've been using to solve this:

 

sum(IF [Month of Incident Date] < [TTM Date] OR

[Month of Incident Date] > [TTM Date]

THEN [Count of Tickets] ELSE 0

END)

 

"Month of Incident" = Current Month and "TTM Date" = counter for Month of Incident (Month of incident - 11) (trailing months)

 

I attached a copy of the data I am working with. Let me know if there is any further info you need. Thanks!

10 answers
  1. Mar 27, 2019, 11:01 PM

    thanks for including the book -

    this will do a running sum on the last 12 dates in the table

     

    thanks for including the book -this will do a running sum on the last 12 dates in the table and return this you had the viz filtered to the last 12 months so there were only 12 dates - I pulled it off

     

    and return this

     

    pastedImage_1.png

     

    you had the viz filtered to the last 12 months so there were only 12 dates - I pulled it off to show the running effect  I only did the total tickets if yo wanted the cost per yo would need to do the math

    $/count

     

    your book is attached

    Jim

     

    If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

0/9000