Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following in SQL (the ListDate is classified as varchar data type)
Min | Max | Item Number | Primary Description | ListDate |
3 | 10 | 1000000 | Cups Slim | 04-04-2017 |
which I load into QlikView as
Report:
LOAD
[Min],
[Max],
[Primary Description],
[Item Number],
ListDate,
Date(Date#(ListDate, 'DD-MM-YYYY')) as LDate,
Month(Date#(ListDate, 'DD-MM-YYYY')) as LDateMonth;
SQL SELECT *
FROM "Report";
I want to restrict the the number of rows by reference to date e.g. I only want the rows with the dates that are within 90 days as of today. How can I do that?
Thanks
Ideally, I would suggest you to restrict this in SQL itself as you don't want to bring extra data into QlikView which you are going to drop in QlikView without processing it. But if you want to do it in QlikView, you can try this
Report:
LOAD [Min],
[Max],
[Primary Description],
[Item Number],
ListDate,
Date(Date#(ListDate, 'DD-MM-YYYY')) as LDate,
Month(Date#(ListDate, 'DD-MM-YYYY')) as LDateMonth
Where Date#(ListDate, 'DD-MM-YYYY') >= Today() - 90;
SQL SELECT *
FROM "Report";
Ideally, I would suggest you to restrict this in SQL itself as you don't want to bring extra data into QlikView which you are going to drop in QlikView without processing it. But if you want to do it in QlikView, you can try this
Report:
LOAD [Min],
[Max],
[Primary Description],
[Item Number],
ListDate,
Date(Date#(ListDate, 'DD-MM-YYYY')) as LDate,
Month(Date#(ListDate, 'DD-MM-YYYY')) as LDateMonth
Where Date#(ListDate, 'DD-MM-YYYY') >= Today() - 90;
SQL SELECT *
FROM "Report";
Thanks Sunny,
That worked quite well.
Shamit