Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All, I am looking for suggestion from you guys,let us suppose if my given data is like below
location date score
mumbai 06/13/2015 40
mumbai 09/20/2015 50
mumbai 12/05.2015 60
pune 05/14/2015 100
pune 07/22/2015 110
pune 11/28/2015 120
Now...the whats the requirement is :
location currentscore previousscore
mumbai 60 50
pune 120 110
i had achieved the current score requirement by using this: firstsortvalue(score,-date) which gives me max date score which is current score
so will u guys please let me known how to achieve previous score
thanks
naveen
Use 2nd expression as below to get the previous score..
FirstSortedValue(score,-date,2)
HI,
You can specify the 3rd parameter for this
firstsortvalue(score,-date, 2) - This gives the previous score.
Regards,
Jagan.
You selected answer as helpful so I am assuming that you haven't got the right answer. Please let us know the same so that we can help you further.
Hello Manish, i do got the answer what i am looking for , to close the thread i selected helpful..so if it is not the right way to close the thread please let me known how to close the thread
thanks
naveen
Hi,
You could always get the previous in the script,
Something like,
Load
*
IF(Rowno() =1 or Location <> PEEK(Location,-1),
0,
PEEK(Score,-1) ) AS PreviousScore
Resident 'Your table'
Order by Location, date;
Mark
Correct Answer is the one which can close the thread... Helpful means the thread is still open and you are looking for the correct answer.