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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set dimension based on a multibox selection

Hello,

I am trying to set a dimension value based on the selection of a multibox selection by a user.  I have attached a sample .QVW with a use case.  When the user selects on the DEPT dimension in a summary table I want either a trigger.  Any thoughts?

Thanks,
Ryan

4 Replies
Not applicable
Author

My use case was cutoff.  When a user comes in a selects a DEPT from the Summary Multibox I would like to automatically set the DEPTHis dimension in the History Multibox to the equivalent value.  I cannot perform this as a trigger in the Multibox as it does not allow triggers.  What would be the best solution to support this use case?  This is an actual use case for another app I support and cannot change the underlying datamodel to link the two tables.

Thanks

vishsaggi
Champion III
Champion III

Check this?

Change your variable vDept to below using Ctrl+Alt+V

= GetFieldSelections(DEPT)

Then in your 2nd Bar Total Charges History Graph use this as your expression:

= IF(GetSelectedCount(DEPT) > 0, Sum({< DEPTHis = { '$(vDept)' } >}Charges), Sum(Charges))

If you want the History Multibox to be selected as well when DEPT is selected. Use trigger like below:

Capture.PNG

Not applicable
Author

Thanks Vishwarath, One other use case I would need is the ability to select multiple values in the DEPT multibox.  Like IT, Financial.  I tried this, but it does not bring back any data when more then one is selected.  Do I need to wrap the variable a certain way in the set analysis?

vishsaggi
Champion III
Champion III

Try this in your expression?

= IF(GetSelectedCount(DEPT) > 0, Sum({< DEPTHis = { $(=concat(chr(39) & DEPT & chr(39),',')) } >}Charges), Sum(Charges))

And change the trigger to below

Capture.PNG