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

Take the last value in set expression

Dear Expert,

last value.png

Based in the picture above, I have 2 object.

I want to create a text object where the result is the last value of field MANDAYS in table HEADCOUNT, based on the value of table CAL_YEAR that I choose.

For example, in that picture above, the result that I want is 876,092


What should I type in the expression to make that result?

Thank you for your helping.

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

please try

Sum({<SNAPSHOT_DATE={$(=max(SNAPSHOT_DATE))}>}MANDAYS)

View solution in original post

8 Replies
swuehl
MVP
MVP

Assuming that Mandays is a field in your data model and the first column field is SNAPSHOT_DATE (both assumptions could be wrong, please describe your chart dimensions / expressions in more detail when posting):

=FirstSortedValue(Mandays, -SNAPSHOT_DATE)

alexandros17
Partner - Champion III
Partner - Champion III

Max({$ <year={'$(=getfieldselections(CAL_YEAR))'}>} Mandays)

Not applicable
Author

thank you for your reply, but still not the result that i want.

i will describe the detail. That is straight table, where the dimension is SNAPSHOT_DATE and the expressions are Sum(HEADCOUNT) and Sum(MANDAYS).

Not applicable
Author

thank you for your reply, but still not the result that i want.

any other ideas?

sasiparupudi1
Master III
Master III

please try

Sum({<SNAPSHOT_DATE={$(=max(SNAPSHOT_DATE))}>}MANDAYS)

mightyqlikers
Creator III
Creator III

hi denny,

could you post some sample qvw.

SAM    

Not applicable
Author

Yups, that's the point.

Thank you so much

maxgro
MVP
MVP

Sum({<SNAPSHOT_DATE={$(=date(max(SNAPSHOT_DATE), 'YYYYMMDD'))}>}MANDAYS)