Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

tying to get max date using first sort value

Hello All,

my expression was working fine till yesterday ,but not now .....

i am trying to get max(date_of_ review)  =TOTAL_SCORE value....for each individual  to achieve that i wrote

                                                     in a       stright table:

                                                                 dimension:name1

                 expression:FirstSortedValue({<ROLE={'SELF_EVAL'}, ENSTEHDAT = >}TOTAL_SCORE, -DATE_OF_REVIEW)

in my date   AMIT INDUSTRYS Score occurs three time ...i want to show only this latest DATE_OF_REVIEW AND

                                                                                                             second latest  DATE_OF_REVIEW

in two diff columns in a stright table ...

but by writing above expression i am getting all .....insteady of those two

please find the attachment

naveen

1 Solution

Accepted Solutions
Digvijay_Singh

As I understand, you want to show TOTAL_SCORE against your specified dimension but you have multiple record for the dimension with different DATE_OF_REVIEW and you want to see latest and second latest DATE_OF_REVIEW.

Like this may be -

Capture.JPG

example script -

Load * inline [

Name, Score, Date

AmitInd,99,03-03-2016

AmitInd,98,02-03-2016

AmitInd,97,01-03-2016 ];

View solution in original post

5 Replies
Digvijay_Singh

May be you can use sort weight as last parameter in firstsortedvalue as 1 and 2.

kunkumnaveen
Specialist
Specialist
Author

Hello,

can u please able to give more brief explanation on that

thanks

naveen

kunkumnaveen
Specialist
Specialist
Author

sunindiagwassenaar

Hello guys ....can any one of you help me in achieving this requirement

thanks

naveen

Digvijay_Singh

As I understand, you want to show TOTAL_SCORE against your specified dimension but you have multiple record for the dimension with different DATE_OF_REVIEW and you want to see latest and second latest DATE_OF_REVIEW.

Like this may be -

Capture.JPG

example script -

Load * inline [

Name, Score, Date

AmitInd,99,03-03-2016

AmitInd,98,02-03-2016

AmitInd,97,01-03-2016 ];

MK_QSL
MVP
MVP

FirstSortedValue({<ROLE={'SELF_EVAL'}, ENSTEHDAT = >}TOTAL_SCORE, -DATE_OF_REVIEW)

&

FirstSortedValue({<ROLE={'SELF_EVAL'}, ENSTEHDAT = >}TOTAL_SCORE, -DATE_OF_REVIEW, 2)