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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mariozubieta
Contributor III
Contributor III

Extra Row with Sum

Hello,

I was wondering if anyone know a possible solution for an issue I'm having.

Basically, what I have is a Number of Events for every month on a table.

Like:

TimeKeyEvents
2017015
2017023
2017036

201704

7
2017051
2017064
2017078
2017084
2017093
2017109
2017112
2017127

I need a way, inscript that I can add an extra row with the sum(Events) of the current and previous 2 months.

The desired result would be:

TimeKeyEventsEventsAdd
20170155
20170238
201703614
201704716
201705114
201706412
201707813
201708416
201709315
201710916
201711214
201712718

Thanks for the help.

1 Solution

Accepted Solutions
devarasu07
Master II
Master II

Hi,

Try with asofTable method at back end script

The As-Of Table

for front end expression u can try like below

rangesum( above( sum(Events),0,12) )

or

sum( aggr( rangesum( above( sum( {$<TimeKey>}  Events),0,12) ),TimeKey))

View solution in original post

2 Replies
devarasu07
Master II
Master II

Hi,

Try with asofTable method at back end script

The As-Of Table

for front end expression u can try like below

rangesum( above( sum(Events),0,12) )

or

sum( aggr( rangesum( above( sum( {$<TimeKey>}  Events),0,12) ),TimeKey))

uacg0009
Partner - Specialist
Partner - Specialist

Hi Mario,

Hope the attachment is what you want.

Extra Row with Sum.PNG

Thanks.

Aiolos