10 Replies Latest reply: Jul 12, 2018 5:34 AM by fatih arslan

# Set analysis on dimensions

Hello everyone,

I have an app that lists stores and its informations. Stores has its brands and sectors. And store brand is on the filter panel.

When I choose a store on filter panel, i want to list all the stores which in the same sector with the selected store. I can achieve this with set expressions but when it comes to using same logic for dimensions it didn't work.

Any help will be appreciated.

• ###### Re: Set analysis on dimensions

You will need to make script modifications to make this to work...

• ###### Re: Set analysis on dimensions

Can you help me for how to do that? Or can you share a sample qvd if possible?

• ###### Re: Set analysis on dimensions

Just like Sunny said it needs to be done in script, but it is easy....

why don't you just create second store/sector table and make your sector field a key field to link it with sector form your current store table.

when selecting store you will filter sector just via association and this association would then link to your second store/sector table in which you would say"store name 2" field listing all stores from filtered sector.

• ###### Re: Set analysis on dimensions

Hi Lech,

That sounds nice, i will give it a shot. Thanks for the reply!

• ###### Re: Set analysis on dimensions

Hi,

an idea without script modification :

- action on selection in field store :

selection on field sector with value = only({\$} sector)

- then new action : deselect field store

that works

regards

• ###### Re: Set analysis on dimensions

Looks like we are talking about Qlik Sense - so no triggers, unless you are using extensions...

cheers

Lech

• ###### Re: Set analysis on dimensions

ah yes didn't see ;

but not understanding yet why different functionalities between qs and qv

• ###### Re: Set analysis on dimensions

Hi Fatih,

If I understand your need correctly, you can use p() modifier in set analysis.

Sample Data:

Expression:

sum({<Sector=P(Sector),Store=>}Value)

Output:

Hope it helps.

• ###### Re: Set analysis on dimensions

Hi Kaan,

From what i read in the question Fatih knows how to do it iwth set analysis on expression - question though was in regards to dimension...

We all know that this can become little bit hazy when used as calculated dimension...

cheers

L.

• ###### Re: Set analysis on dimensions

Hi Kaan,