Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there anyway to have jan as the first month in the list box...similarly Monday as the first day in the day list box?
i cant do that using the options given the sorting section.
Your help on this would be appreciated.
Hi, I believe that your month and day fields are text and not dates. So I made two new list boxes based on your dates. See the attached file.
you could add an expression to the sort tab of your listbox (Day) to order the Day listbox
=match(Day, 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')
but I suggest to make a Calendar (llok for Master Calendar in community, an example here How to create a Calendar) in the script: you can then add and order your listbox using Text and/or "Numeric Value" without always typing the previous (or similar) expression
Hello!
Although creating a master calendar is the best approach, you can solve your problem using QlikView date functions which return dual values and sort the list boxes in numerical order. Your code would look like this:
SET MonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
SET DayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';
Attendence_Clear:
Load
Date,
WeekDay(Date) as Day,
Weekno,
Month(Date) as Month,
Quarterno,
Year,
Intime,
Outtime,
Totalhrs;
SQL SELECT * FROM AUDWSQLLAB.dbo."Attendence_Clear";
Notice that I have changed the variables MonthNames and DayNames since you seem to want full names for months and week days, not abbreviated ones.
Attached is a QVW working as expected.
Cheers.