Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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.

Tags (2)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Compare last row and next-to-last rows

=FirstSortedValue(clicks, -start_period, 1)

gives you the last value,

=FirstSortedValue(clicks, -start_period, 2)

gives next to last value and so on.

-Rob

2 Replies
MVP & Luminary
MVP & Luminary

Re: Compare last row and next-to-last rows

=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

Re: Compare last row and next-to-last rows

Perfect, very simple.  Thanks.