Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
alisonpwallis
Creator
Creator

Dates sorting within chart

Hi

I have a chart showing cumulative records for two years. I want the y axis to show (in order) the week concerned and the year:

e.g.

01 2012

02 2012

03 2012

I have a field called Application Date which contains the date information for each record. I've tried creating a calculated dimension: =week([Application Date])&year([Application Date])

but this won't seem to sort and i get a random order of values.

Can anyone help?

Thanks

Alison

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

try convert it to a numeric like this:    =Year*100 + week(Date)

This will give you a number that is easy to sort chronologically   201401, 201402  etc...

Use it as the dimension or just a sort order of 'expression'

View solution in original post

3 Replies
JonnyPoole
Employee
Employee

try convert it to a numeric like this:    =Year*100 + week(Date)

This will give you a number that is easy to sort chronologically   201401, 201402  etc...

Use it as the dimension or just a sort order of 'expression'

Gysbert_Wassenaar

Try creating it as: dual(week([Application Date])&year([Application Date]), [Application Date])


talk is cheap, supply exceeds demand
MarcoWedel

dual(week([Application Date])&' '&year([Application Date]), WeekStart([Application Date]))


to get only one value at the axis for all dates within this week