Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
RangeAvg (
aggr( sum({<Year = {$(=vCurrentYear)},Week ={">= $(=vCurrentWeek-4)<= $(=vCurrentWeek-1)"}>} TRX_NET_SALES), WeekStart,ITEM_SKU))
Issue: the above condition works fine until current week is not one what if its one then it will return -3, 0
So we have to write an expression where it will work fine even though the current week is one and also it should work well even wen an year is having 52 weeks or leap year 53 weeks, so please write an expression accordingly.
example:if we are in 2016 first week it should also calculate 52,51,50,49 like that
can you please help me on this
Regards,
Devendar
maybe adding a week serial field,
Look at Richard Pearce's document on calendar with flags. Much easier to create any comparative date period.
https://community.qlik.com/docs/DOC-6593
Hope this helps,
Jason