Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the attached Document, within the Document I have a Cyclic Group when you cycle round to the field "DayOfWeek", I want it to be sorted as per the following:
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
I've tried to a expression but does not work?
Has anyone any ideas on how to do this?
Thanks
Use a dual to assign your DaysOfWeek a numerical values (useable as sort order), like:
perCal:
LOAD Db,groupB,groupC,groupD,realName,Date,Week, dual(DayOfWeek,match(DayOfWeek,'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'))as DayOfWeek,
stddays INLINE [
Db,groupB,groupC,groupD,realName,Date,Week,DayOfWeek,stddays
UK,TSAE,AILGNA,,ADARENDRAG LRACZOZ,31/12/2011,52,Saturday,0,
UK,TSAE,AILGNA,,ADANOTRUB NAIRBZOZ,31/12/2011,52,Saturday,0,
UK,TSAE,AILGNA,,ADA)PNB( RELWOD KRAMZOZ,31/12/2011,52,Saturday,0,
UK,TSAE,AILGNA,,ADA)2 tfihS( NEWOB PILIHPZOZ,31/12/2011,52,Saturday,0,
UK,TSAEN,SDEEL,,ADAHSLAW EVETSZOZ,31/12/2011,52,Saturday,0,
...
];
Then you can sort your column just by double clicking the appropriate header.
See also attached.
Stefan
In the Sort Expression box try the following:
=match(DayOfWeek,'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday')
First suggested to me be Steven Redmond here: http://qvdesign.wordpress.com/2012/01/20/useful-alternate-sort-method-for-listboxes/
Hope that helps,
Matt - Visual Analytics Ltd
New Qlikview Design Blog: http://QVDesign.wordpress.com
Use a dual to assign your DaysOfWeek a numerical values (useable as sort order), like:
perCal:
LOAD Db,groupB,groupC,groupD,realName,Date,Week, dual(DayOfWeek,match(DayOfWeek,'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'))as DayOfWeek,
stddays INLINE [
Db,groupB,groupC,groupD,realName,Date,Week,DayOfWeek,stddays
UK,TSAE,AILGNA,,ADARENDRAG LRACZOZ,31/12/2011,52,Saturday,0,
UK,TSAE,AILGNA,,ADANOTRUB NAIRBZOZ,31/12/2011,52,Saturday,0,
UK,TSAE,AILGNA,,ADA)PNB( RELWOD KRAMZOZ,31/12/2011,52,Saturday,0,
UK,TSAE,AILGNA,,ADA)2 tfihS( NEWOB PILIHPZOZ,31/12/2011,52,Saturday,0,
UK,TSAEN,SDEEL,,ADAHSLAW EVETSZOZ,31/12/2011,52,Saturday,0,
...
];
Then you can sort your column just by double clicking the appropriate header.
See also attached.
Stefan