Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date dimension not sorting properly in pivot chart

Hey guys. I've got a pivot chart with two dimensions, one is a name and one is a date dimension. I'm doing a rollup count by Month_Year in my calendar dimension. The counts work fine, but the dang dates aren't sorting properly. The Month_Year field is a text field, not an actual date field. I've got a Master_Date field that's a date, as well as a Date_Key field that's like 20090519. I tried going to the sort tab and sorting by numic value, or by Master_Date or Date_Key for the expression. Nothing seems to be working. The dates are all out of order. Any ideas or advice? Thanks!

1 Reply
johnw
Champion III
Champion III

Generally speaking, I would use a date field for Month_Year. Using the formats that QlikView likes just makes things go so much more smoothly. Another possibility is to use a dual() value, such as "dual(Month_Year,monthstart(Master_Date)) as Month_Year", and then sort by numeric value. Another possiblity is to load all the Month_Years before you load the main table, load them in the order you want, and then sort by original load order. I'm sure there are a number of other solutions as well.