Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Week End date is Saturday instead of Sunday.
I have Week Ending date as Saturday and need to calculate the expression based on rolling 13,26 weeks.
But,in qlikview when i write expression =WeekEnd(max([Week Ending Date])) it is taking Sunday as Weekending date which is in correct and Saturday is Week ending date in my case.
It should display result based on 3/7/2020 ,3/14/2020 ,not 03/08 not 03/15.
Here is the exp = num(sum({<ID-={012}, [Week Ending Date]={">=$(=(WeekEnd(max([Week Ending Date]), -13)))<=$(=WeekEnd(max([Week Ending Date])))"}>}SLS*$(vCurrency))+sum({<ID={014}, [Week Ending Date]={">=$(=(WeekEnd(max([Week Ending Date]), -13)))<=$(=WeekEnd(max([Week Ending Date])))"}>}[Sold Units]*SRP*$(vCurrency))/1000, '$#,##0.0')
In a text box with =WeekEnd('07/03/2020') -in DD/M/YYYY format- it will return 8/3/2020 with the default SET FirstWeekDay=0;
If you use SET FirstWeekDay=6; it will return 7/3/2020
Hi, there is a script variable called FirstweekDay that defines when a week starts (and ends), it's at the beggining of the script, try with:
SET FirstWeekDay=6;
I have 7 days in a week and week start is Sunday and weekend is Saturday .
In a text box with =WeekEnd('07/03/2020') -in DD/M/YYYY format- it will return 8/3/2020 with the default SET FirstWeekDay=0;
If you use SET FirstWeekDay=6; it will return 7/3/2020
I found your post useful. Can some one suggest 13 week sales % change to Last year for the same expression
exp = num(sum({<ID-={012}, [Week Ending Date]={">=$(=(WeekEnd(max([Week Ending Date]), -13)))<=$(=WeekEnd(max([Week Ending Date])))"}>}SLS*$(vCurrency))+sum({<ID={014}, [Week Ending Date]={">=$(=(WeekEnd(max([Week Ending Date]), -13)))<=$(=WeekEnd(max([Week Ending Date])))"}>}[Sold Units]*SRP*$(vCurrency))/1000, '$#,##0.0')