Qlik Sense Accumulating Bar Charts, Waterfall Chart  How To
Christof Schwarz Sep 28, 2016 12:06 PMAccumulating Chart (1 dimension, 1 measure)
While I suspect, that in later versions of Qlik Sense there should be more elegant way with a simple click to set charts to accumulate a sequence of bars (the new value totalling up to the previous values), here is an attached app that allows you all of that, illustrated and explained:
To do this you should embrace the socalled intrachart functions. You need "Above()" and "RowNo()" in this case.
Above with only one argument delivers the result of the "above" dimension, but with a 2nd and 3rd argument will deliver an array of values, so you need another function around to sum this array into one value: RangeSum() ... not Sum() !
RangeSum(Above( sum(ExpenseActual),0,RowNo())) // Where Sum(ExpenseActual) stands for your measure formula
This table shows what's happening in the different parts of the formula
Accumulating Chart (2 dimensions, 1 measure)
This case is a bit more complex. Two dimensions should accumulate, each of which separately  of course. So the cumulation is calculated for each member of the 2nd dimension separately. (Visually this only makes sense with grouped bars, not with stacked bars).
Also, this is possible, the formula is more complex to explain.
What you can see is that Customers of Type G3 had less accumulated Expenses than G2, which is impossible to see from the above bar chart.
The chart has two dimensions, one measure  here Sum(ExpenseActual), but the measureformula has to be extended like this
$(=Concat(DISTINCT 'IF([$(=GetObjectField(1))] = ' & CHR(39) & [$(=GetObjectField(1))] & CHR(39)
& ', RangeSum(Above(TOTAL
sum(ExpenseActual)
*([$(=GetObjectField(1))] = ' & CHR(39) & [$(=GetObjectField(1))] & CHR(39) & '), 0, RowNo(TOTAL)))'
, ',') & Repeat(')', Count(DISTINCT [$(=GetObjectField(1))])))
Waterfall Chart (1 dimension, 1 measure)
It gets much more difficult to draw this has to be a waterfall chart. There is no real "bar offset" to the axis, so in reality there has to be a bar segment for the offset with the color set to transparent.
This is doable, but the formula is really complex to explain.
 Put your chart expression into a variable e.g. "vExpr1"
 Create a bar chart with two dimensions
 your main dimension (in above example it is YearMonth)
 a caluclated pseudo dimension with this formula: =ValueList('', ' ', ' ') Label this dimension with a space (=invisible label)
 Add the following expression, where $(Expr1) is your chart expression:
 Pick(RowNo()
, RangeMax(0, RangeSum(Above(TOTAL If(RowNo()=1,$(vExpr1)),0,RowNo(TOTAL)))  RangeMax(0, $(vExpr1)))
+ RangeMin(0, RangeSum(Above(TOTAL If(RowNo()=1,$(vExpr1)),0,RowNo(TOTAL)))  RangeMin(0, $(vExpr1)))
,Fabs(RangeMax(0, RangeSum(Above(TOTAL If(RowNo()=1,$(vExpr1)),0,RowNo(TOTAL))))
 RangeMax(0, RangeSum(Above(TOTAL If(RowNo()=1,$(vExpr1)),3,RowNo(TOTAL)))))
,Fabs(RangeMin(0, RangeSum(Above(TOTAL If(RowNo()=1,$(vExpr1)),0,RowNo(TOTAL))))
 RangeMin(0, RangeSum(Above(TOTAL If(RowNo()=1,$(vExpr1)),3,RowNo(TOTAL)))))
)
 Pick(RowNo()
 Add this formula in the color by expression formula:
 If(RowNo()=1, ARGB(0,0,0,0), RGB(68,119,170))
The RGB color code is the Dark Blue of the Qlik Sense standard theme, feel free to change it.

Advanced Barchart.qvf 2.8 MB