Recent searches


No recent searches

Zendesk Explore - Month Year Custom Attribute Incorrect Order

Answered


I have created an attribute using this formula:

LEFTPART(MONTH([Ticket created - Date]),3)+"-"+YEAR([Ticket created - Date])

However the order is going by alphabetical, and we need this to be in the actual date order.
Is there any way of doing this automatically? Or changing the formula to order it correctly?

Since it is unfeasible to order the set manually and we want to show graphs on multiple months...


0

6

6 comments

image avatar

Gab Guinto

Zendesk Customer Care

Hi Robin,
 
It is the expected behavior for attributes like this – those combining multiple date attributes – to be ordered alphabetically by default, even when the option 'Sort like time attribute' is ticked. 
  • Sort like time attribute: If your calculated attribute represents dates, this option places your date values in the correct order.
    • Note: This option applies only to single attributes. Combining attributes, such as adding a year to the end of a month, will result in sorting alphabetically instead of chronologically.
I'm afraid there's no option to customize the attribute formula to have the values listed in chronological order. 
 
A workaround that I can recommend, if you're working on a Table-type query, is to add the default Year and Month attributes before the custom attribute date and then just hide those columns (via Chart options menu). This way, the column for your custom Month-Year attribute will display the values chronologically. But, for other chart visualization types, this workaround would not be applicable; using Ordered sets might be the best option for other query types. 

1


Hi Gab,

I'll try to incorporate that in the tables, and I guess the graph reports will need to use the single attributes month and year for now.

Is this something that is ever to change or is being worked on? Surely it can't be considered correct to have these sort alphabetically when they a formats of date attributes?

1


image avatar

Gab Guinto

Zendesk Customer Care

Hi Robin,
 
We could not tell for sure yet if this is in the roadmap. But I definitely agree, it would make more sense if the values are sorted chronologically. Hope this will be addressed soon. If you have some time, I recommend that you start a post about this in our Product Feedback topic. Our Product team actively monitor our feedback threads, and conversations with high user engagement ultimately gets flagged for planning. 

1


image avatar

Gerald J

Zendesk Luminary

Can I use date format function to convert timestamp to yyyy-mm format. so it would still sort correctly. If yes, what is the correct syntax. thanks!

0


image avatar

Salim Cheurfi

Zendesk Customer Care

Hi Gerald, 
 
The best is to use the date format function DATE_FORMAT(_date,_format) just add the timestamp with the format of your choice
 
The DATE_FORMAT function render full timestamps as different types of dates of your choice.
 
More information on how to achieve that in our article with the full list of date format available: Function References Explore
 
I hope this helps, 
 
Best,

0


Hello Robin

We are unsure if this is on the roadmap at this time. But, I firmly believe that sorting the values according to chronological order would make more sense. I'm hoping this will be handled quickly.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post