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

How to I get the last known text value?

Hello,

I'm trying to get the last known value of a textfield in a textbox.

What I've got: records with data regarding different persons (1 record for every month and person). My selection is always 1 person, in the most recent record/month i've got a field which tells me that it is the most recent record for this person (_Lastmonth = 1, all other records for that person have _Lastmonth = 0). What I'm trying to get is the value of last known working loction (fieldname = Facts.Location).

In records

Record - Employee - _LastMonth - Facts.Location

1 - A - 0 - Amsterdam

2 - A - 0 - London

3 - A - 0 - Hong Kong

4 - A - 1 - Almere

What I like to get in my textbox = "Almere"

I've tried combination with ({$<_LastMonth={1}>}Facts.Location), but got no result.

Has anyone an idea?

Best regards,

Raimund Leussink

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try =only({$<_LastMonth={1}>}Facts.Location)

Note that this will only work if there's only one record where _LastMonth is 1. So you have to make a selection first if you have more employees. That's what you say you do so the expression should work in your scenario.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try =only({$<_LastMonth={1}>}Facts.Location)

Note that this will only work if there's only one record where _LastMonth is 1. So you have to make a selection first if you have more employees. That's what you say you do so the expression should work in your scenario.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for the fast reply