Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have date field in below format and i have to sort this value in List box in ascending order.
e.g.
Date
2016-12,
2016-1,
2016-10,
2016-5
Expected Output
2016-1,
2016-5,
2016-10,
2016-12
Please also refer below image
Thanks in advance.
Is this field read as date by QlikView? May be try like this in the script
LOAD Date(Date#(Date, 'YYYY-MM'), 'YYYY-MM') as Date,
....
FROM ....;
Also, read here:
Hi Sunny,
This date field according to user want to see Year and Week number.
Already i have created date logic in edit script that is Year and Week number(2016-1).
and I also showed this value in Dashboard in List box.
but i want to proper sort order so how i sort this? that means
2016-15
2016-16
2016-17
2016-18
2016-19
like this.
How do you create this Year and Week field in the script?
Hi Ishwar,
Try this as sort expression,
=Makeweekdate(Left(Field_Name,4),SubField(Field_Name,'-',2))
But best practice is to format the date field in script itself.
Hi Sunny,
I have written below code for week in edit script
Year(Date) &'-'& Week (Date) As WEEK
Date is my date field.
this WEEK field showing me below result and i want to show this WEEK in ascending sort order in List box
Pleas refer below screen shot
Try this:
Dual(Year(Date) &'-'& Week (Date), WeekStart(Date)) As WEEK
Hi Tamil,
I have written logic for WEEK field in edit script and i want to show that field in List box in Ascending order.
Hi Sunny,
Thanks for your help your logic is working properly. I got solution.
Please can you explain me your logic.
Hi Sunny,
Thanks for your help. your logic is working properly. i got solution.
Pleas can you explain me your logic.