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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Differentiate by Buttons or listbox

Hi,

We were having the sales data for different stores and each store is categorise into 2 types one is App initiated and App not-initiated.

Here i want to create buttons for initiated stores.

In the below stores only the stores 83,84,86,34,118,2,12 were App initiated stores .

Here i need to create two buttons or listbox so that if i select App Initiated it will shows the initiated stores and same for App  not-initiated stores.


Stores: 

 

123
128
45
66
48
47
43
42
41
106
94
87
81
89
97
107
92
110
88
121
83
84
86
34
118
2
12
14
5
77
73
16

Thanks..

9 Replies
marcus_sommer

You could create an additionally categorizing field for this, for example:

if(match(Stores, 83,84,86,34,118,2,12), 'App initiated', 'not App initiated') as StoreCluster

- Marcus

avinashelite

if you have the details for App initiated stores and App not-initiated stores then I would suggest you to create a flag for the same in the script and use it in the front end .

how you will identified the App initiated stores and App not-initiated stores ?

nareshthavidishetty
Creator III
Creator III
Author

Hi,

PFA for sample data.

We have data for App initiated only from that need to differentiated.

Thanks..

avinashelite

I would see the sheet name Initiated but could not find the store_id, if you know the exact sheet name and column then try like this

LOAD Store_ID

from

Initiated sheet ;

Store_Information:

LOAD *,

if(exist(Store_ID,Store_Id),'App initiated', 'not App initiated') as Store_info

nareshthavidishetty
Creator III
Creator III
Author

Thanks! Marcus it's working but i need this dynamically, so that every time no need to do it manually.

@ Avinash

Can you please check once the logic you provided.Below is the result am getting when i put it in Edit Script.

Untitled.png

Thanks..

avinashelite

In the Initiated sheet which is the store_Id field ??? is the Location is store_id ??? could you please confirm this info 

nareshthavidishetty
Creator III
Creator III
Author

Yeah i have renamed Location into store_id in the Initiated sheet and then i have use the logic.

Thanks..

avinashelite

Ok then don't rename the Location field and try like this

LOAD Location as LC

from

Initiated sheet ;

Store_Information:

LOAD *,

if(exist(LC,Store_Id),'App initiated', 'not App initiated') as Store_info

you should retain the order of load

marcus_sommer

Quite common for such tasks is the use of Mapping … and not the geographical kind. But like you see (with match or exists) there are also others ways possible.

- Marcus