Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklizzy
Creator II
Creator II

sort weekday based on todays date

Hi

I have a table of counts over the last 7 days, sorted mon tues wed...etc

is there a way of sorting by today onwards, So today is Thursday - start the sort on Friday

 

thanks

Labels (1)
10 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi

you could try in this way

Expression:

If(weekdayn>=$(DayToday), weekdayn-$(DayToday),$(DayToday)+1+weekdayn)

you need to

1) create the variable 

DayToday = Num(Weekday(Today()))

2) create a field (or you could use the expression instead of weekdayn)

Num(WeekDay(date)) as weekdayn