Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
mp802377
Creator
Creator

Sort chart on Day Hour

I have a chart. First dimension is =Weekday(Date)&' '&num(hour,'00')&':00'  second dimension is =Date(WeekStart(Date, 0, -1), 'DD-MMM-YY') . Then of course the expression. I like the chart overall, but I have sort issues. The data starts for the Sunday prior, but the sort on the axes is not starting on Sunday, but on Friday. I have tried changing to expression and sorting on date, but that is not working. Here is what I created:

qlikview.JPG

Below is the chart I was told to create from. The 1 is Sunday, the 2 is Monday, the three is Tuesday and so on. I am sure they will be fine how I have it (to me having the actual day instead of a number is better), but they will want the sort to start on Sunday and not Friday. How do I fix that?  Thank you for your help.

goal chart.JPG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Ok, then try (with a recent version of QV):

=Dual( Weekday(Date)&' '&num(hour,'00')&':00' , Weekday(Date,6) + hour/24 )

View solution in original post

4 Replies
swuehl
MVP
MVP

As first dimension, try a dual value:

=Dual( Weekday(Date)&' '&num(hour,'00')&':00' , Date + hour/24 )

Then sort numeric.

mp802377
Creator
Creator
Author

When I try that the weeks are no longer comparing each other but adding on to the end. So it makes just one line.

using dual.JPG

swuehl
MVP
MVP

Ok, then try (with a recent version of QV):

=Dual( Weekday(Date)&' '&num(hour,'00')&':00' , Weekday(Date,6) + hour/24 )

mp802377
Creator
Creator
Author

thank you so much! that worked! I had tried the other previously and had the one line, but the =Dual( Weekday(Date)&' '&num(hour,'00')&':00' , Weekday(Date,6) + hour/24 ) worked. Thank you again!