Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set the first value of a field as a filter?


Hello everyone,

I am creating a chart where i need to apply the first value of the field "Process" as the default filter (view).

When the user open the dashboard, it is needed that the chart already display this first line of the dimension "Process".

The goal of this, is to not display too many information in the chart.

Thanks,

12 Replies
miguelbraga
Partner - Specialist III
Partner - Specialist III

See this thread:

Load Script - Select Last Value

Hope you find this useful

miguelbraga
Partner - Specialist III
Partner - Specialist III

Or you can set it by addressing the last value on the field, using the following code:

Temp:

LOAD            LastValue(ID) as ID,

                      LastValue(Value) as lastValue

Resident Table;

Then you can set the variable like this:

vView:

=lastValue

Hope it helps

Regards,

MB

Not applicable
Author

Thanks for your tips MB.

Thats what i did:

I created the variable to set the first value of the field "Process" as you can see below:

varProcess= peek('Process', 0, 'ProcessTable');

After that, i used On Open Trigger to select the variable value that i want to display and applied an alternate state to set this trigger only in the chart i needed.

The problem is that i lost the filters from other objects from my sheet.

Do you know if it is possible to set more than one alternate state in my chart?

Thanks