Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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!