Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Alternate states with a common column

I have 3 tables Products ,Customer and shops

Shops table is the connecting Products and Customers in data model.I am displaying Products details in one sheet and Customer details in other sheet with alternate states enabled but I want Shop_Name column(Used as filter in both sheets) from shop table to effect both the sheets commonly .How to implement this

1 Solution

Accepted Solutions
CarlosAMonroy
Creator III
Creator III

Ok, that's fair.

So, what comes to my mind is the following:

Go to Settings -> Document Properties, under Triggers tab, section Field Event Triggers, add an 'OnSelect' action.

The action should be a selection type:

Select in field = Shop_Name and Searching String = =Shop_Name.

Then create another action with the same parameters but the trick is in the Alternate State selection, by choosing Product.

Here is the Screenshot.

3-14-2017 11-13-49 AM.png

3-14-2017 11-14-25 AM.png

Now when you select a shop, will be selected on both sheets.

Thanks,

Carlos

View solution in original post

31 Replies
Anonymous
Not applicable
Author

build a listbox for [Shop_Name column] in "$-State" and change your expression(s) in the following way

sum( { [YOUR_ALTERNATE_STATE] <[Shop_Name column]=$::[Shop_Name column]>} yourvalue)

Then all fields besides [Shop_Name column] are in [YOUR_ALTERNATE_STATE]

Anonymous
Not applicable
Author

I am using Shop_Name Column on both the sheets,Using your logic,if Shop_Name filter is selected on one sheet ,other sheet Shop_Name filter is just hiding non matching rows.

CarlosAMonroy
Creator III
Creator III

Hi Krishna,

If you can share a sample file, that would be great. For me make sense what Robin suggested you but it's not for you.

Thanks,

Carlos

Anonymous
Not applicable
Author

please prepare a small example...

Anonymous
Not applicable
Author

Please find the sample file attached.I want the shop_Name column to work commonly on both the sheets

tresesco
MVP
MVP

In the Product sheet use state <default state> for Shop Name field both in table and listbox.

CarlosAMonroy
Creator III
Creator III

Hi Krishna,

I'm not sure if I completely understand your request. Please help me understand what you need.

Alternate states performs comparative analysis between sets of multiple data items.

Now what is your approach, if you leave both sheets in the default state and you select any values from the shop filter, you'll see both sheets are affected by the selections you made.

The next link may be helpful. How to use Visual Cues and Alternate States in QlikView?


Thanks,

Carlos

Anonymous
Not applicable
Author

Hi Carlos,

I am trying to use Alternate states in little Hacky way .I just  want two alternate states objects to respond for a single common filter.In my case that filter is Shop name and I want to place that filter on both the sheets.Apart from Shop name filter ,two sheets have their own filters .Those filters should affect only their own state objects

I can achieve this with set analysis but I want to try with alternate states

Anonymous
Not applicable
Author

Hi Tresesco,

Thanks for your response but It will not fit my requirement.If I use your logic,Location filter on product sheet is not affecting other objects on product sheet and I also don't want the location filter on customer sheet to affect the product sheet objects