Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort weekday with specific date last

Hi all,

I have a problem with sorting weekday. I want to sort the days of the week with a specific day as the first day to see.

For instance if i want to show the last 7 days and today would be a wednesday i want the sort order to be like:

Weekday
tuesday
monday
sunday
saterday
friday
thursday
wednesday

this makes it easier to read a chart that shows the workload from the last 7 days.

Could anybody help me with this?

My thanks in advance for the help!

11 Replies
jonathandienst

I suggest that you post a sample with some representative data and the chart under discussion. That way we can all stop guessing....

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks Tresesco, with your help i managed to fix it! Your document helpt me very much!

It works now with the following stats:

Dimension:

Weekday

Expression 1:

count({1}DISTINCT if(Date>=Date('13-03-2014')-7 and Date<Date('13-03-2014'), OrderID))

Expression 2:

num(count(OrderID) / count( distinct if(OrderID>0, Weeknumber & Year)),'#.###,##')

Sort Expression:

If(Weekdaynr<WeekDay(date('13-03-2014')+1),Weekdaynr,Weekdaynr-7)

View solution in original post