Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm having difficulty with a report I'm putting together, which is looking at volumes by week (in my straight table, I have multiple expressions - week, week+1 etc).
My issue is that the Qlikview default week is Monday-Sunday, and I need the weeks to be Sunday-Saturday (for everything within this report).
For example, if I select 2013, week 10 in my calendar, I would want to see the volumes for 3rd - 9th March.
I have looked through the forums for solutions, but I can't find a solution that will work for me (one that is simple enough for a beginner like me to understand, at least!).
Any help would be greatly appreciated!
WeekStart(YourDate, 0, -1) for previous sunday
WeekStart(YourDate, 0, -1) for previous sunday
Hi,
Try like this
Date:
LOAD
SalesDate,
If(WeekDay(SalesDate) = 6, Week(SalesDate) + 1, Week(SalesDate)) AS SalesWeek;
LOAD * INLINE [
SalesDate
1/1/2013
1/2/2013
1/3/2013
1/4/2013
1/5/2013
1/6/2013
1/7/2013
1/8/2013
1/9/2013
1/10/2013
1/11/2013
1/12/2013
1/13/2013
1/14/2013
1/15/2013
1/16/2013
1/17/2013
1/18/2013
1/19/2013
1/20/2013
1/21/2013
1/22/2013
1/23/2013
1/24/2013
1/25/2013
1/26/2013
1/27/2013
1/28/2013
1/29/2013
1/30/2013
1/31/2013
2/1/2013
2/2/2013
2/3/2013
2/4/2013
2/5/2013
2/6/2013
2/7/2013
2/8/2013
2/9/2013
2/10/2013
2/11/2013
2/12/2013
2/13/2013
2/14/2013
2/15/2013
2/16/2013
2/17/2013
2/18/2013
2/19/2013
2/20/2013
2/21/2013
2/22/2013
2/23/2013
2/24/2013
2/25/2013
2/26/2013
2/27/2013
2/28/2013
3/1/2013
3/2/2013
3/3/2013
3/4/2013
3/5/2013
3/6/2013
3/7/2013
3/8/2013
3/9/2013
3/10/2013
3/11/2013
3/12/2013
3/13/2013
3/14/2013
3/15/2013
3/16/2013
3/17/2013
3/18/2013
3/19/2013
];
Hope this helps you.
Regards,
Jagan.
Hi Vivien,
Thanks for your quick response!
Possibly a stupid question - does that go in the script where I create my calendar?
Ya. In your script. This calculation is the cleanest way to tell QlikView your week start on sunday.
Hi..
Please somebody help him with the technical inputs regarding implementation
Challenges you faced during Implementation
Thanks in Advance....