Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community,
I'm having troubles with date grouping. I want to be able to select data for the last 'x' number of days (last 7 days, last 30 days etc). I have some date grouping working fine (Today, Yesterday, This Week, Last Week etc.) but can't find a way to get the last x days.
I've attached a modified version of the excellent 'Date-Grouping.qvw' from the Qlikview Cookbook (Thanks Rob!). I've tried modifying the Inline table directly:
Last 7 Days; vToday; vToday-7
Which doesn't work. I've also tried assigning a variable:
LET vLast7Days=Date(today(1)-7);
...
Last 7 Days; vToday; vLast7Days
Which also doesn't work. I've stepped through the script load and the variables seem to assign properly but the end result is still not working.
Any help would be much appreciated!
Damien.
A small mistake, the ordering of the variables were wrong in the inline part, correct it as:
Range; RangeStart; RangeEnd
Last 7 Days; vLast7Days; vToday
Last 30 Days; vLast30Days; vToday
I.e.- vToday should be there under RangeEnd instead of RangeStart.
I think below link will help you on your question.
A Rapid "Fast Calendar Selections...", a great boost of multi periods analysis! ...
A small mistake, the ordering of the variables were wrong in the inline part, correct it as:
Range; RangeStart; RangeEnd
Last 7 Days; vLast7Days; vToday
Last 30 Days; vLast30Days; vToday
I.e.- vToday should be there under RangeEnd instead of RangeStart.
Argh, so simple. Many Thanks