Represent Open vs Closed Tickets by Month

cmarkum
cmarkum Contributor

I'm not sure if this should go in Beast Mode or in Card Builder but I will start here. We have a data source that has one row per Ticket#. We would like to show Open Tickets vs Closed Tickets by month on one card. The problem that we have is that there is only one date that we can choose (Created Date or Closed Date). I know I'm missing something and can't get it to work for some reason. I used Beast Mode to get MonthName from Created date but if I use that as my basis, it will only show tickets that were created in June and Closed in June. I just can't seem to get it to work. I was just going to create a new datasource that would do it for me (i have completed it in SQL) but I'm trying not to create a new data source for one card. Any ideas are much appreciated. 

 

Thanks in advance

Comments

  • jmo
    jmo Domo Employee

    It sounds like your data set shows you how many tickets were opened in a time period and how many were closed in a time period. It does not show you how many were in an open state during any given time period. 

     

    To show how many were in an open state you'll need tickets to show up multiple times. Each ticket needs to show up once for each time period you're interested in. It is probably safest to do it at the daily level and then use a beast mode to count distinct ticket numbers for longer time periods. The final data set would only have one date column. Each ticket would show up for every day it was open and would be dropped from the data set once it is closed.

     

    As described, the closed tickets will disappear once they have been closed out. You should probably add a flag on the closed date in case you need to also show how many tickets were closed in one view. In fact, it would probably be best to add a flag for the open date as well. You're likely to need it at some point as well.

    -----
    I work for Domo.
    **Say "Thanks" by clicking the thumbs up in the post that helped you.
    **Please mark the post that solves your problem as "Accepted Solution"
  • cmarkum
    cmarkum Contributor

    I'm not sure that will work. It is one line per ticket with two distinct dates. Created date and closed date. I don't need the state of a ticket at a given time. I only need the count of tickets where the Created Date = Month. Then, I want to count the number of tickets where the Closed Date = Month. I basically need the "Month" to be a dimension that is not tied to create date or closed date. 

     

    I need 

     

    "January"  = 750 open, 800 closed

     

    Since I currently get the Month Name from either the created or closed date it will filter based on that.

  • nalbright
    nalbright Contributor

    It would probably be best for you to create two beastmode calculations, one that looks at the month a ticket was created, something like Month Created = Month (Created Date) and Month Closed = Month (Closed Date).  Then you can simply look at the number of tickets by month based on that single number from 1 to 12.  Of course, if you wanted more than one year's worth of information one could create similar calcualtions for Year Opened and Year Closed and then drill down from tickets by year to tickets by month.

    "When I have money, I buy books. When I have no money, I buy food." - Erasmus of Rotterdam
  • From what is sounds like you want a snapshot of the number of open and closed tickets for a give month. Not just a month or the current number. If that is the case, I personally see two options: 

     

    1) Create a data source to append data rather than replace and pull only the current months closed tickets and what tickets are left open. Schedule this to run on the last day of the month after your close of business. Use the batch date for your date field. You can then use a best mode fuction to say if it is open or closed based on the close date being filled in. 

     

    2) Use a data flow. In broad strokes.  You would:

    Create a view of distinct close dates (or created dates) grouping on month and year. 

    Create a view that uses the distict dates joined on base table  to count the number of open tickets by month.

    Create a view that is for the number that closed tickets for that month. 

    For the final output you would join the distinct dates query with the open and closed.  The final output would be something like: Month, Year, Snapshot date, # open, # closed.

  • I had this same problem.

     

    I had my main data source and split it into two datasets, one for open and closed, with an additional date field. For Open tickets, I filtered out any that didn't have a closed date and for closed tickets the closed date needed to be populated. This way there will never be duplicates in your data.

     

    The new date field will hold the open and closed dates for the tickets, respectively. Then I did a dataflow with a simple UNION ALL between the two new datasets. This created data that I was able to use for both open and closed tickets together because of the new date field but also could look at each ticket type separately if needed. 

     

    I also created a beast mode calculation to give me the difference.

  • kshah008
    kshah008 Contributor

    @cmarkum, did any of the replies above help address your issue?

This discussion has been closed.