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: 
124rooski
Partner - Creator
Partner - Creator

2 buttons to show me USA and rest of world

Hoping this is the right board to ask this question. I have a geoanalytics bubble layer with lat long information and also store revenue info which dictates the bubble sizes. I have about 700 stores world wide, and would like to break up the stores depending on a list of store names. One list has about 600 and the other list has about 100. So my 2 buttons would be show in one instance 600 stores, and when a user selects the 2nd button it'll only show those 100 stores. I have a working prototype right now with my 2 buttons.

variable:  vButton = 1

if( vButton = 1, sum({< STORE_REGION = {'xyz','abc', etc} >}REV),

   if vButton =2, sum({< STORE_REGION = {'123,'345',} >}REV)

Now my map, does show these stores but the issue is its giving me all the stores. The vButton (1) shows me about 600 stores (doing a quick check against a KPI), but the button 2 doesn't seem to exclude the 600 and instead shows the same amount. I have the list of these stores and used Notepad++ to add in ' and , to use it in a variable but not sure how to go about doing this? Is there a simpler way?

Labels (3)
2 Replies
Lisa_P
Employee
Employee

A simpler way to do this is to create it in the load script.

Create a new field that you are comparing either the Country or your STORE_REGION to your list that fall either into USA or rest of world categories. You could do this with nested if statement or mapping table lookup to create this new field that could then just be a filter pane.

124rooski
Partner - Creator
Partner - Creator
Author

Thanks Lisa, I went with a different route and created a variable with my formula which then I called in the graph itself. It seems to be working exactly how I want it to be. Your answer helped me get to where I needed to so thanks very much for that!