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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension sort

Well, the issue doesn't seem to be resolved. Even when it was sorting the days before the weeks it was not sorting the days int he right order. Attached is a screen shot of what it is doing now. Starts at week 14 and goes to 1 then lists week 15 days. I want it to be in Descending order starting at the most recent week/day.

Any thoughts?

Attached is a screen shot of what it is doing. error loading image

below is my dimension code

= if(Week < vCurrentWeek, ' ' & Week, if(Week = vCurrentWeek, if(DayOfWeek < vDayOfWeek, Week & ' - ' & DayOfWeekAlpha)))


1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Your expression returns a String, and Strings are sorted just the way it shows - "15" goes before "2". If you have to use strings, you can at least format the Week number to always show 2 digits:

= if(Week < vCurrentWeek, ' '
& num(Week, '00'), if(Week = vCurrentWeek, if(DayOfWeek < vDayOfWeek, num(Week, '00')
& ' - ' & DayOfWeekAlpha)))