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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create expression for ACUMULATED values

Hello

How can I create an expression to accumulate values like shown in the picture:

acum.jpg

Thanks!!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If you want to do this in the chart, there a two options:

a) use a second expression identical to your first

=count(distinct employeeID)

and activate 'full accumulation' in expression tab for that expression.

b) use as second expression

=rangesum(above(count( distinct employeeID),0, rowno() ))

Hope this helps,

Stefan

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

try:

load

day(Fecha_Creacion) as Day,

Empleados,

if(rowno()=1,Empleados,Empleados+peek([Empleados Accum])) as "Empleados Accum"

from .... etc


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gys

I tried this but can´t seem to get desired result...

Empleados Accum does not exist in the source I am trying to create it as new in the Pivot Chart.

#Empleados is another calculated expression as: count(distinct employeeID) where employeeID is coming from source

diegofcaivano
Partner - Creator
Partner - Creator

Hi.

In that case, make a table object with DAY as dimension, EMPLEADOS as a first expression, and a second expression as follows:

EMPLEADOS + BELOW(EMPLEADOS, -1, 0)

Regards.

Edit: To consider the first row, here is the complete expression:

IF(ROWNO()=1, EMPLEADOS, EMPLEADOS + BELOW(EMPLEADOS, -1, 0))

El mensaje fue editado por: Diego Caivano

swuehl
MVP
MVP

If you want to do this in the chart, there a two options:

a) use a second expression identical to your first

=count(distinct employeeID)

and activate 'full accumulation' in expression tab for that expression.

b) use as second expression

=rangesum(above(count( distinct employeeID),0, rowno() ))

Hope this helps,

Stefan