Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Carry Over Totals

Hello All,

I have a situation where I need to carry over the totals from the previous month to the latest month.

let's say...


Month
March 2013
March 2013

TypeItem TypeABTotal
Beginning
2000200
Sales
400500900
Loss
800100900
Total
14006002000





So the contents are Quantity.. so the Total 2000 should carry over to the next month (April 2013)


Month
April 2013


TypeItem TypeABTotal

Beginning14006002000

Sales5007001200

Loss8501501000

Total27501450

4200






Total will also carry over the next month and so on..

The data I have where sales and loss, items types are all coming from the database, while my beginning balance only comes from

an excel file that I need to merge to the database.

Are there any way I can achive this?

Thank you,

Donna

1 Reply
Siva_Sankar
Honored Contributor

Re: Carry Over Totals

You can add a field to your calendar script as num(Month(Month)) as Month_Num and replace Month in the table expressions with Month_Num.
Modify the definitions for variables as follows:
1. vCurrentMonth
Definition: =num(Month)
2. vPreviousMonth
Definition: =if(num(Month)=1,12,num(Month)-1)
Use something like this expression for Current month
=num(avg({<Month_Num={$(vCurrentMonth)}>}MeanTotal)/100,'##%')
Use something like this expression for Previous Month
=num(avg({<Month_Num={$(vPreviousMonth)}>}MeanTotal)/100,'##%')

or try the following thread
http://community.qlik.com/thread/76227

Hope it helps

Siva

Community Browser