Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rolling Weekly Total

Hello Smart People, I am looking to do a rolling total on a week by week. weekly revenue was derived by grouping by week .

=Aggr(sum(sales),week_of_Year)

I need to generate the expected column result broken down by week. I have used

RangeSum(Above(Total Sum(Aggr(sum(sales),week_of_Year), Rowno() without any luck. please your assistance is highly appreciated.

     

Year MonthDateDay
of Week
Weekly RevExpected
Weekly Rolling
Apr 20154/30/20154$0.$499
Apr 20154/29/20153$0.$499
Apr 20154/28/20152$0.$499
Apr 20154/27/20151$499.$499
Apr 20154/24/20154$0.$499
Apr 20154/23/20153$0.$499
Apr 20154/22/20152$0.$499
Apr 20154/21/20151$499.$499
Apr 20154/17/20155$0.$0
Apr 20154/16/20154$0.$0
Apr 20154/15/20153$0.$0
Apr 20154/14/20152$0.$0
Apr 20154/13/20151$0.$0
Apr 20154/10/20155$799.$3,690
Apr 20154/9/20154$0.$2,891
Apr 20154/8/20153$1,498.$2,891
Apr 20154/7/20152$894.$1,393
Apr 20154/6/20151$499.$499
Apr 20154/3/20152$0.$0
Apr 20154/2/20151$0.$0
3 Replies
Not applicable
Author

I figured it out guys--- Here is the code that I was looking for

=RangeSum(below( total Sum(Split_Sales_Amount_Post_Discount), 0, Aggr(RowNo(), Week_Of_Year, Date_ID)))

Thanks

Qrishna
Master
Master

Is this what you expecting? i Guess so?

Capture.PNG

Not applicable
Author

Yes Krishna- Thanks but I have already resolved it. My other question is how to get the percentage of the column [Rolling weekly Rev] the expected result is below as Column [Weekly Rev%]. Thanks

Rolling Weekly RevWeekly Rev%
$499.0.00%
$499.20.79%
$499.31.19%
$499.62.38%
$499.15.59%
$499.20.79%
$499.31.19%
$499.62.38%
$0.0.00%
$0.0.00%
$0.0.00%
$0.0.00%
$0.0.00%
$3,690.92.25%
$2,891.90.34%
$2,891.100.00%
$1,393.87.06%
$499.62.38%
$0.0.00%
$0.0.00%