Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Above() or below() functions

Hi there

I want to create a chart as per the below, I have the user, date and the volume per day.

But in the MTD column I need to have 61+71 in row 2 for example.

In row 3 its the sum of 71+61+75 and so on.

Is this possible?

I have tried above and below functions but cannot seem to achieve this.

Thanks,

Aidan

   

User DateVolumeTotal MTD
User 101/11/20157171
User 102/11/201561132
User 103/11/201575207
User 104/11/201556263
User 105/11/201555318
User 106/11/201574392
1 Solution

Accepted Solutions
MVP
MVP

Re: Above() or below() functions

Try with

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

6 Replies
MVP
MVP

Re: Above() or below() functions

Try with

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

Re: Above() or below() functions

Or may be this:

=RangeSum(Above(TOTAL Sum(VolumeField), 0, RowNo(TOTAL)))

Not applicable

Re: Above() or below() functions

Hi Sunny

That's great, only thing is if I wanted it to reset at each new row fro example below;

UserDateVolumeTotal MTD
User 101/11/20157171
User 102/11/201561132
User 103/11/201575207
User 104/11/201556263
User 105/11/201555318
User 106/11/201574392
User 201/11/20154040

Thanks again for your help

AIdan

josemanuel_cayo
New Contributor III

Re: Above() or below() functions

Hi,

you can use the following expression in your query:

LOAD ...

[Volume] + if(isnull(Peek(acc_volume, -1)), 0, Peek(acc_volume, -1)) as acc_volume

from ...;

MVP
MVP

Re: Above() or below() functions

That's why I left out the TOTAL qualifier.

Not applicable

Re: Above() or below() functions

Perfect thank you

Community Browser