Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
mgranillo
Contributor III

Below function vs above function

I have an  issue with the above and below function. 

Lets say i have the following table in a chart:

Date            Value    RowNo()

1/1/2017     4               1

1/2/2017     4               2

1/3/2017     7               3

1/4/2017     2               4

I can add another expression RangeMax(above(sum(value),0,rowno())) and this will return

Date            Value     RowNo()     RangeMax(above(sum(value),0,rowno()))

1/1/2017     4                  1                    4

1/2/2017     4                  2                    4   

1/3/2017     7                  3                    7

1/4/2017     2                  4                    7

Now I'd like to sort my table by descending date.  What do I need to change in RangeMax(above(sum(value),0,rowno())) to keep the same results? 


Is this something simple that I'm missing?  I tried the below function but it doesn't work with how RowNo() works

Date            Value     RowNo()             ?

1/4/2017     2                  1                    7

1/3/2017     7                  2                    7

1/2/2017     4                  3                    4

1/1/2017     4                  4                    4

1 Solution

Accepted Solutions
antoniotiman
Honored Contributor III

Re: Below function vs above function

Hi Michael,

maybe this

RangeMax(Bottom(Sum(Value),1,NoOfRows()-RowNo()+1))

Regards,

Antonio

4 Replies
Highlighted
mgranillo
Contributor III

Re: Below function vs above function

Attaching sample Qlik Sense app

antoniotiman
Honored Contributor III

Re: Below function vs above function

Hi Michael,

maybe this

RangeMax(Bottom(Sum(Value),1,NoOfRows()-RowNo()+1))

Regards,

Antonio

effinty2112
Honored Contributor

Re: Below function vs above function

Hi Michael,

Try:

RangeMax(Below(sum(Value),0,NoOfRows()- RowNo()+1))

Cheers

Andrew

mgranillo
Contributor III

Re: Below function vs above function

Both seem to work. Thanks for the help.  Antonio's response came in first so marking his as correct