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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
louise119
Creator III
Creator III

Data Selection

I want to change the value output to the filter depending on the conditions.

Currently, the if statement is used to determine the contents of the filter as shown below, but the data is not inherited when linked to another sheet. Because the formula is different (Sheet A and Sheet B).
What should I do?

When I selected the data Region="US" on sheet A, the selected data Region="US" is selected on sheet B as well.
That's what I want to do.


【SheetA】
filter:
If(Region="US" or Region="UK",Region)

【SheetB】

filter:
If(RegionX="US" or RegionX="UK" or RegionX="China" or RegionX="Korea" or RegionX="France",RegionX)

Labels (4)
5 Replies
Chanty4u
MVP
MVP

To achieve the desired behavior where the filter selection on Sheet A affects the filter on Sheet B, you can use the Qlik Sense native feature called "Alternate States." Alternate States allow you to create separate, independent sets of selections within a Qlik Sense app.

louise119
Creator III
Creator III
Author

Thank you so much.
I'm sorry my explanation was not enough.

For example, if Japan is selected in the test sheet, I want Japan to be selected in the test2 sheet as well.

Currently, Japan is not highlighted in green on the test2 sheet.
Because the filter formula is different between test and test2. (refer to the following)

test:=If(Region='USA' or Region='Japan',Region)
test2: =If(Region='USA' or Region = 'Japan' or Region = 'UK' ,Region)

test_1.pngtest_2.png

 

Chanty4u
MVP
MVP

May be modify this 

test:=If(Region='USA' or Region='Japan',Region)

test2: =If(test,Region)

louise119
Creator III
Creator III
Author

Thank you for reply.
I can't change the test2 formula because  I wanna filter with Region = USA or Region = Japan or Region = UK only...


N30fyte
Creator
Creator

Hi @louise119 !

I think this does what you want. 

I started with the following two simple loads:

aregiontable:

LOAD * inline [
aregion
UK
USA
Europe
China
];

bregiontable:

LOAD * inline [
bregion
UK
USA
Europe
China
];

I created a sheet called Region A, with a filter pane to select from dimension aregion

Next I created a sheet called Region B. In Actions for this sheet, I chose: 

Action: Select values in a field

Field: bregion

Value: =GetFieldSelections(aregion,';')

I also added a filter pane to show the selections in bregion.

When I make selections from the a region/dimension on the filter pane in Sheet Region A:

Region A.png

 then switch to Sheet Region B, the same selections are made in the b region/dimension:

region b.png

 

I believe that if you have more than 6 regions you will need to modify the Value under Actions to increase the maximum:

 

=GetFieldSelections(aregion,';',25)

But I haven't tested this.