Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

Cummulative Expression

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 attachement sample

In the sample model . I am using vPerFormula and vPerFormulaBud to calculate the sales and budget resp.

4 Replies
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

sunny_talwar

Wow! this is huge file. Were you not able to reduce the application size for uploading purposes?

maxgro
MVP
MVP

The file is too big.

What if every question has an attachment of some hundred megabytes?

suvechha_b
Creator III
Creator III
Author

Sales Value is calculated a variable  :

vPerFormula : sum({$<TranType = {$(vAmountType)},CurrentPer = {1},Fiscal_Year = {$(=max(Fiscal_Year))}>} Amount)

Budget Value is calculated a variable  :

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

How to use this variables in the cummulative sum .

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

and



Method 2 is RangeSum(Above()) Method:

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

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

Re: need to get the cummulative sum