Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Set Analysis - Keep Parent Dimension

Dear all, good morning.

I'm having some issues about creating a set analysis to keep the parent dimension when selected one specific field.

For example, when select BRAZIL in country the list, the table should keep all other countries for the same region.

SA_DOUBT.png

I mean, when I select a country I want that the table understand that I select the whole Region, and not a specific country.Like image below:

SA_DOUBT2.png

Someone has a clue about it?

Thanks !!

LOAD * INLINE [

    REGION, COUNTRY, VALUE

    AMERICA, BRAZIL, 10

    AMERICA, US, 20

    EUROPE, ITALY, 30

    EUROPE, ENGLAND, 15

    ASIA, JAPAN, 12

    ASIA, CHINA, 18

];

1 Solution

Accepted Solutions
Highlighted
Not applicable

Re: Set Analysis - Keep Parent Dimension

Hi Fabio,

I don't how much this will be more complex in your real example, but using the inline table you provided, you can try something like this:

sum({$<REGION = P(REGION), COUNTRY=>} VALUE)

View solution in original post

4 Replies
Highlighted
Contributor III

Re: Set Analysis - Keep Parent Dimension

See the attached QV.

I used triggers on County Field !Dropbox - qv1.qvw

Highlighted
Not applicable

Re: Set Analysis - Keep Parent Dimension

Hi Fabio,

I don't how much this will be more complex in your real example, but using the inline table you provided, you can try something like this:

sum({$<REGION = P(REGION), COUNTRY=>} VALUE)

View solution in original post

Highlighted
Contributor III

Re: Set Analysis - Keep Parent Dimension

You can Add 2 triggers on Document Proprieties.

On COUNTRY the actions should be: Select in Field, choose field REGION and the value is =REGION, the second Action is Clean this field, choose COUNTRY. See attached files.

Highlighted
Not applicable

Re: Set Analysis - Keep Parent Dimension

That's it Jean-Pierre ...

Appreciate your help.