Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
| TimeKey | Events |
|---|---|
| 201701 | 5 |
| 201702 | 3 |
| 201703 | 6 |
201704 | 7 |
| 201705 | 1 |
| 201706 | 4 |
| 201707 | 8 |
| 201708 | 4 |
| 201709 | 3 |
| 201710 | 9 |
| 201711 | 2 |
| 201712 | 7 |
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:
| TimeKey | Events | EventsAdd |
|---|---|---|
| 201701 | 5 | 5 |
| 201702 | 3 | 8 |
| 201703 | 6 | 14 |
| 201704 | 7 | 16 |
| 201705 | 1 | 14 |
| 201706 | 4 | 12 |
| 201707 | 8 | 13 |
| 201708 | 4 | 16 |
| 201709 | 3 | 15 |
| 201710 | 9 | 16 |
| 201711 | 2 | 14 |
| 201712 | 7 | 18 |
Thanks for the help.
Hi,
Try with asofTable method at back end script
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))
Hi,
Try with asofTable method at back end script
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))
Hi Mario,
Hope the attachment is what you want.
Thanks.
Aiolos