Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

need to get the cummulative sum

Hi ,

How to build the following chart :

  

Input
Trading Day12345
Sales500100020005001000
Budget002000000
Budget=20000/5 is 4000
Output
Trading Day12345
Sales5001500350040005000
Budget40008000120001600020000

Please find the exel file attached

5 Replies
suvechha_b
Creator III
Creator III
Author

Note : My Sales is calculated by variable : (vPerSales)

  and budget : (vPerBudget) which is calculated monthly basis . eg, 20000

Anonymous
Not applicable

tab expression

define "full accumulation"

does it work as you expected?

sunny_talwar

Script:

Table:

LOAD [Trading Day],

    Sales,

    Budget

FROM

Community_171870.xlsx

(ooxml, embedded labels, table is Sheet1);

Join(Table)

LOAD Sum(Budget)/Count(Budget) as Budget1

Resident Table;

Output:

Capture.PNG

Method 1 is Full accumulation method


Capture.PNG

Method 2 is RangeSum(Above()) Method:

=RangeSum(Above(Sum(Budget1), 0, RowNo()))

=RangeSum(Above(Sum(Sales), 0, RowNo()))

HTH

Best,

Sunny

suvechha_b
Creator III
Creator III
Author

Hello Sunny ,

My Sales and Budget are calculated by variable

eg,

vBudget = sum({$<TranType = {'Budget_$(vAmountType)'},CurrentPer = {1},Fiscal_Year = {$(=max(Fiscal_Year))}>} Amount)

So , can you please give me the expression :

LOAD Sum(Budget)/Count(Budget) as Budget1


as , Budget is a variable it is not working


and



Method 2 is RangeSum(Above()) Method:

=RangeSum(Above(Sum(Budget1), 0, RowNo()))

=RangeSum(Above(Sum(Sales), 0, RowNo()))

suvechha_b
Creator III
Creator III
Author

Input
Trading Day12345
Sales500100020005001000
Budget002000000

where Sales is calculated with the help of variable , eg , vSales

vSales = sum({$<TranType = {'Sales_$(vAmountType)'},CurrentPer = {1},Fiscal_Year = {$(=max(Fiscal_Year))}>} Amount)

vBudget = sum({$<TranType = {'Budget_$(vAmountType)'},CurrentPer = {1},Fiscal_Year = {$(=max(Fiscal_Year))}>} Amount)



Can anyone tell me how to write the following expression :

LOAD Sum(Budget)/Count(Budget) as Budget1



as vBudget / count(vBudget ) is also not working

and



Method 2 is RangeSum(Above()) Method:

=RangeSum(Above(vSales ), 0, RowNo()))

=RangeSum(Above(vBudget), 0, RowNo())) are not working

Cummulative Expression