Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Data Works for AI is here - Join the discussion and enter to win a pair of Qlik kicks: Join the Conversation!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ajay_S1
Contributor II
Contributor II

Get all values from field.

Hi,

I have embedded Qlik charts in my mashup project using the <qlik-embed> component. I need to apply an initial selection when the mashup loads.

The requirement is to dynamically determine the highest (latest) value from a field and use it as the initial selection. For example, if the field is Year and it contains values such as 2022, 2023, 2024, 2025, and 2026, I need to identify the maximum value (2026) at runtime and apply it as the initial selection when the mashup opens.

Labels (4)
2 Replies
TheLazyDeveloper
Contributor III
Contributor III

You could have a dynamic bookmark that is set for the latest year and apply that bookmark to your mashup/code. Similar process we have in place atm. 

Chanty4u
MVP
MVP

Hi

Create this in  qliksense script 

If(Year = Max(TOTAL Year), 1, 0) as LatestYearFlag

Then your mashup only needs to select LatestYearFlag = 1, avoiding the need to retrieve and compare field values in JavaScript.