Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

How can I use the previous value on a simple table?

Hi!

I need to use the previous value from the same colum.. like this..

Screenshot_1.png

first I get the MAX(TM CAUSA) , then i put this value in the same row. for the next rows in TM ACUM should be the previous value + TM CAUSA.

I tried whith ABOVE() but it has a problem whit the order:   When I use the Above() function, doesn't permit to order values. Why?

MAX(TM CAUSA) = max(total AGGR(sum( {<PLANTA={'xx'} >} CANTABS),ORIGEN,CAUSA)))

5 Replies

Re: How can I use the previous value on a simple table?

Try this:

RangeSum(Above(TOTAL Max(TM CAUSA), 0, RowNo(TOTAL)))

Not applicable

Re: How can I use the previous value on a simple table?

it returned 0, but Above() doesn´t permit to order by column

Re: How can I use the previous value on a simple table?

Not sure I understand, can you elaborate as to what went wrong?

Not applicable

Re: How can I use the previous value on a simple table?

I need TM Causa in descending order, like this... Capture.PNG

When I use Above() the order is missing.

Capture.PNG

because.. When I use the Above() function, doesn't permit to order values. Why?

I need to reproduce this:

Capture.PNG

Re: How can I use the previous value on a simple table?

AFAIK this is definitely a limitation and the only work around I can think of is to sort the table in the back end of the application and use Aggr() function. But this still might not behave well with selections as script sort order won't change based on selection. A lot of us are hoping that this comes up in the future releases of QlikView/ Qlik Sense

‌. What you can do is sort by dimensions in Aggr and not by expressions -> The sortable Aggr function is finally here!