6 Replies Latest reply on Dec 27, 2013 12:15 PM by Manas Ranjan Kar

# How to group a list of help desk tickets by 0-10 days old and 11-20 days old?

How to group a list of help desk tickets by 0-10 days old and 11-20 days old in a bar chart?

• ###### 2. Re: How to group a list of help desk tickets by 0-10 days old and 11-20 days old?

Hi,

On assumption you've captured 'Ticket Raised Date' dimension, following should work:

1. Right-click 'Ticket Raised Date', select create calculated fields. Give the calculated field an appropriate name , 'Days Since Ticket Raised' and enter following formula: DATEDIFF('day', [Date Ticket Raised], Today()) .

2. In the Measures pane, right-click 'Days Since Ticket Raised', select 'Create Bins' from drop-down menu. Rename the field to something more appropriate e.g. 'Days Since Ticket Raised Group', and select size of bin e.g. 5 days.

You can create hierarchy and do some other funkyness afterwards.

Done.

• ###### 3. Re: How to group a list of help desk tickets by 0-10 days old and 11-20 days old?

Say, the date field is DATE and no. of tickets by NTICKS, then the formula for a new variable "GROUPS" might look like this

IF (TODAY() - [DATE]) <=10 THEN "0-10 DAYS"

ELSEIF (TODAY() - [DATE]) <=20 THEN "11-20 DAYS"

ELSEIF .....

ELSE .....

END

Keep in mind that TODAY() will give you the flexibility of updating the groups on a daily basis. And yes, don't forget to change the timezone for TODAY() to work properly.

However, a packaged workbook would be nice too, to understand the data structure.

• ###### 4. Re: How to group a list of help desk tickets by 0-10 days old and 11-20 days old?

Great thank you, will give it a try.

• ###### 5. Re: How to group a list of help desk tickets by 0-10 days old and 11-20 days old?

Manas, when you just put your date formula

TODAY()-[Order Date]

...in a calculated field what do you get? I don't thinking you'll be getting anything like 10 or 20. Make sure you test your posts before making them, otherwise you confuse the newer folks more than they already are. Please rewrite your post or remove it. Thanks, and thanks for trying to help out.

Cheers,

--Shawn

• ###### 6. Re: How to group a list of help desk tickets by 0-10 days old and 11-20 days old?

Thanks Shawn Wallwork for the feedback.

I had used a similar function in one of my projects earlier, and it seemed to work fine. It just gives me a simple difference of dates without much fuss. My other option would be to use DATEDIFF function, but I  didn't have very accurate results with it. However, I can test the formula if Phillip provides me a sample workbook.