Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
tjleggz
Contributor II
Contributor II

Qlik Actions Not Working

I have a Vizlib filter that has a list of different facilities (facilityId) and allows only one facility to be selected at a time. Each facility belongs to only one state (state). I have a KPI that I want to update based on the state picked so I can compare the facility KPI value versus a state average, but the KPI won't update unless I have a filter for state selected. I've tried researching different ways to achieve this with no success.

1. The Qlik sheet action to select all possible in the state field since there is only one possible once the facilityID is fixed . (doesn't work)

2. The VizLib filter action to select all possible in the state field for the same reason as 1. (doesn't work)

Ideally, I only need the facility filter since there will always only be one state associated with it. I would be open to some sort of set analysis expression also but am not sure how to get that to work since the state value will change based on the facility selected. If I need to have two filters (one for facilityId and one for state), how do I sequence them so the user has to pick state before they pick a facility? Also, if I do not need to use vizlib, that would be great.

Example:

facilityId     state

A                     NY

B                     NY

C                     PA

Labels (2)
1 Solution

Accepted Solutions
JHuis
Creator III
Creator III

I changed the App & Data:

 


facilityId      , State , amount
A , NY , 1000
B , NY , 800
C , PA , 7000

];

View solution in original post

8 Replies
JHuis
Creator III
Creator III

Hello,

 

you can do always one selected in QlikSense. Then there is only one selected in facilityId . 

https://help.qlik.com/en-US/sense/May2023/Subsystems/Hub/Content/Sense_Hub/DataSource/select-single-...

 

 

tjleggz
Contributor II
Contributor II
Author

Thanks, this helps me avoid using a vizlib filter to allow only one selection but it doesn't solve my issue. If i set both my state and facilityId fields to "only one value" then I am stuck with the default State and cannot pick any facility outside of that initial state.

JHuis
Creator III
Creator III

Dear @tjleggz ,

 

no if you create a filter it is still possible to select an different state. 

 

and is it not better to just only use only one value at one field?

tjleggz
Contributor II
Contributor II
Author

I do not understand what you are saying. I want only one filter (facilityId) that allows one selection by the user. Once a facilityId is selected, the associated state should also be selected (but there is no state filter available to the user, this should be in the background). The user should also be able to change to/select any facilityId regardless of what state the default facilityId is in.

The solution you provided me does not allow the user to select facilities outside of the default state. All of them are grayed out and not selectable.

JHuis
Creator III
Creator III

Hi,

made an example app with this data

 

facilityId      , State , amount
A , NY , 100
B , NY , 200
C , PA , 300

];

So what would you like that the amount for state= NY is 300? Then i have to do some scripting 

 

tjleggz
Contributor II
Contributor II
Author

in your example, i want the user to have a facilityId filter and two KPIs.

The facilityId filter lets you pick only one facility at a time.

The first KPI shows the amount for the facility chosen.

The second KPI shows the average of the amounts shown for the facilityIds in that state.

JHuis
Creator III
Creator III

I changed the App & Data:

 


facilityId      , State , amount
A , NY , 1000
B , NY , 800
C , PA , 7000

];

tjleggz
Contributor II
Contributor II
Author

Thank you for the help. I was not aware of the MaxString function.