Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare last row and next-to-last rows

I have data that is pre-aggregated outside of QlikView.  Each row contains a start date and an end date but the date ranges vary and I don't know when I will receive the next row of data.

I need a way to compare the last row of the table to the next-to-last row of the table, preferably in a text box.

An example qvw and associated Excel file is attached.

Thanks in advance for the help.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

=FirstSortedValue(clicks, -start_period, 1)

gives you the last value,

=FirstSortedValue(clicks, -start_period, 2)

gives next to last value and so on.

-Rob

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

=FirstSortedValue(clicks, -start_period, 1)

gives you the last value,

=FirstSortedValue(clicks, -start_period, 2)

gives next to last value and so on.

-Rob

Not applicable
Author

Perfect, very simple.  Thanks.