Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Ethel
Creator III
Creator III

Button to make selection from multiple dimensions

I have a filter pane where end user is supposed to chose different dimensions, e.g. specialties and departments. When user chooses specialty1, system shows several rows(e.g. 5 rows) in the 1st column of the table below. Then user choses department1. System automatically updates table and user sees in the 1st column only 3 rows and data in the second column(e.g. 3 rows). I want to allow user to "submit" decision and see only 3 rows in the first column and 3 rows in the second columns without showing and confusing user with original 5 rows in the first column. (3 rows in the first column and 3 rows in the second column happen because these fields are joined). Is it possible to "submit" decision? 

 

Thanks a lot in advance!

1 Solution

Accepted Solutions
anthonyj
Creator III
Creator III

You're welcome.

You can add $(vSpeciality) and $(vDepartment) to a KPI object or you can add it into the title of the table to add context. 

For example the title function could read:

='Data for ' & $(vSpeciality)' & ' in the ' & $(vDepartment)

Or something to that affect.

Regards

Anthony

View solution in original post

6 Replies
anthonyj
Creator III
Creator III

Hi @Ethel ,

That's a good question. Qlik will update each time a selection is made in the filter so I'm not aware of any way of delaying the resolution of an applied filter. There are some workarounds I can think of.

You could concatenate the two columns into one filter so the user would have to choose a combination of specialty and department in that one filter. This would result in potential duplicates for either specialty or department depending on the distinct values in the combination of the two columns.

For example filter might show a specialty twice:

Specialty 1, Department 1

Specialty 1, Department 2

Other options could include using the variable input drop downs in place of the filters. This would be done using the concat( ) function on the two columns in the variable input so you can choose your specialty and department and then allocate the two variable values as a selection to a button.

For example:

Create two variables: vSpecialty and vDepartment

add variable input visualisation as a drop down and allocate these variables.

Choose Dynamic in the Values drop down and add (eg)=concat(Speciality, '|'). This will create a list of all specialties in your data that you can use to choose from.

Once you do this for both Specialty and Department add a button and add action 'Select values in a field'. 

Choose your Specialty column in the Field and in the Value add ='$(vSpecialty)'. The apostrophes are important in case their are spaces in your selections.

Add another for your department.

Once you've set this up, your end user will be able to choose a specialty and department from the drop downs, then hit the button to 'Submit' your choice.

I hope this makes sense.

Thanks

Anthony

Ethel
Creator III
Creator III
Author

Hi Anthonyj, thank you very much!!!!

I really like the second idea! But I'm very new to qlik sense. Could you please show me how to create drop down menus and where/how to create variables? 

Thanks a lot in advance!!!

anthonyj
Creator III
Creator III

Hi @Ethel ,

Absolutely,

You'll see this icon with the "x=" at the bottom left hand side of your canvas. 

anthonyj_0-1635282436072.png

Open the variable in put by clicking on this icon. Create a new variable called "vSpeciality". You don't need to add a definition at this stage. As a general rule in Qlik we usually begin variables with a lower case "v". It makes them easier to find.

Under "Custom Objects" and "Qlik Dashboard bundle" drag the "Variable Input" onto the canvas.

In the properties panel on the right under "Variable >> Name" you'll find "vSpeciality" that you created.

In "show as" choose "Drop down".

Now, under "Values" you'll see fixed or dynamic. Choose dynamic and expand the "fx" to get into the editor and add the below code.

=concat(distinct Specialty,'|')

"Specialty" is the placeholder for whatever your column name is called. This creates a distinct pipe separated list of all values in your Specialty column. Now when you choose an option from the list it allocates that value to the variable vSpecialty.

Next step is to add a Button from the charts menu.

Under "Actions and navigation" add the action "Select values in a field"

Choose your Specialty column from the Field list and in the "Value" section open the "fx" and add your dollar expanded variable.

='$(vSpeciality)'

Add in the single quotes just in case vSpecialty resolves to a value with a space. This is where it connects the value chosen in your variable drop down to the native Qlik filters.

Once that is done you'll be able to select a value from your variable input and hit the button to submit.

Just follow those steps again to add vDepartment and when you get to the button you can see there's an option to add another action. Add the action to select from your department column so that you will now have 2 actions set in your button. When you select your Specialty and Department it will submit both.

I hope I've set these work instructions out clear enough. If you have any problems let me know.

Thanks

Anthony

 

Ethel
Creator III
Creator III
Author

Thank you so much! 

Should I add value vspecialty also to the table to be able to show submitted data to the end users?

anthonyj
Creator III
Creator III

You're welcome.

You can add $(vSpeciality) and $(vDepartment) to a KPI object or you can add it into the title of the table to add context. 

For example the title function could read:

='Data for ' & $(vSpeciality)' & ' in the ' & $(vDepartment)

Or something to that affect.

Regards

Anthony

Ethel
Creator III
Creator III
Author

Thank you very much!!!