Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.