Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

How to use FirstSortedRow and Above/Below in a table as expression?

Hi Community! 

I'm currently trying to use the FirstSortedRow and Above/Below functions in a combination. 

My data mainly contains of Client,Date & Stage. I would like to add a column which calculates the status per max date and group it by client. I have done in in the back-end (Script) with the help of this thread ( and it works well, however the requirement now in using it as expression. 

I calculated max_date with: =Max(Total<Client>Date)
I calculated max_datestatus: =if(Date=Max(TOTAL <Client>Date),Only(Stage))

Current Result: 















Thanks in advance. 



1 Solution

Accepted Solutions

or even this

FirstSortedValue(TOTAL <Client> Stage,-Date)

View solution in original post

3 Replies

Hi Mrichman,


You can use below set analysis as measure.

Aggr(Nodistinct FirstSortedValue(Stage,-Date),Client)

Hope this will help!!!


or even this

FirstSortedValue(TOTAL <Client> Stage,-Date)


Did either of the two posts get you what you needed?  If so, do not forget to close out your thread by returning and on the post that helped, use the Accept as Solution button to mark that post as the correct answer to give the poster credit and let other Members know that worked for you.  If you are still working on things, please leave an update, and if you did something different, please consider posting what that was and once posted, use the button on that post to close the thread.


To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.