Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

Try this:

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

Not applicable
Author

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

sunny_talwar

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

Not applicable
Author

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

sunny_talwar

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!