Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a table chart comparing rolling 7 days this year with rolling 7 days last year. The problem is though that I need to compare weekday with weekday because sales are very different through the week.
For example, I am comparing Tuesday 09/07/2013 with Tuesday 10/07/2012.
The user can from a calendar pick a date and the rolling 7 objects start with showing sales for the selected date and 6 days prior to that date. That is all handled in the expressions
The problem is with the dimension for this chart. If have chosen weekday and I have problems with sorting the days in the correct order. I want the chosen weekday to be at the bottom and the prior days to go up.
In the example from above it should be:
Wed
Thur
Fri
Sat
Sun
Mon
Tue
Any help is very appreciated as I have struggled with this for quite some time now
In the sort pane, select the Weekday field. Check "expression" for sort, and enter the datefield value as the sort expression.
-Rob
Hi Rob,
Thanks, but I have tried this and it gives me this result (see below) if I select 10th May 2013. The first day, in this case Friday is always correct but after that the sorting won't work. Any other ideas?
I don't recognize the language of your weekdays, so I'm having a hard time interpreting your results. What language is it? Can you upload a sample qvw?
-Rob
Hi again,
Sorry, forgot about that.
The language is the QlikView-land language, Swedish
This will tell you what days they are:
DayNames ='Må;Ti;On;To;Fr;Lö;Sö';
The sort setting looks like this:
The expression for the rolling 7 days for current year looks like this:
Count( {$< Year=, Month=, Day=,Week=,Quarter=, Date={">=$(=Date(Max(Date-6)))<=$(=Date(Max(Date)))"}>} distinct Ordernr )
And for last year rolling 7 days:
Count( {$< Year=, Month=, Day=,Week=,Quarter=, Date={">=$(=Date(addmonths(Max(Date-5),-12)))<=$(=Date(addmonths(Max(Date+1),-12)))"}>} distinct Ordernr
Thanks
Try
=min(Date)
for the sort expression.
-Rob
Thanks Rob, but that didn't change the sort order.
Any more ideas?
Asa