Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get latest value from a field

I have a table like:

ID Type

1 a

2 a

3 b

I have a chart that displays differently depending on what the latest entry in the above table was. So it might look something like this:

if( latest(Type) = a, SUM(something), SUM(something else)

My question is how do I get that Type value into the equation? Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Try this:

if( Only({$<ID={'$(=max(ID))'}>} Type) = a, SUM(something), SUM(something else))

Hope this helps.

Best Regards!

View solution in original post

1 Reply
Not applicable
Author

Hi,

Try this:

if( Only({$<ID={'$(=max(ID))'}>} Type) = a, SUM(something), SUM(something else))

Hope this helps.

Best Regards!