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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

Show B when selecting A

I'm working on a complex scenario, and my question is: I have a table storing price for products A and B. When I select A, I need to see price for B.

How should I write the expression? Any advice helps. Thanks in advance!

1 Solution

Accepted Solutions
robert99
Specialist III
Specialist III

Hi

It should do it automatically if you model is set up to establish the product - matching product link

So if you select a product it will automatically show all the sub product details

View solution in original post

8 Replies
kfoudhaily
Partner - Creator III
Partner - Creator III

Hello,

you may use fonctions like GetSelectedCount and GetFieldSelections to control showing/hiding conditions.

please share more info about your context or an exemple to provide a more accurate suggestion.

regards,

QlikView Qlik Sense consultant
wanyunyang
Creator III
Creator III
Author

I made up a detailed scenario:

I have a Item Filter and a Item Information Table. For example, if I choose Necklace1 in filter, table will show information for Necklace1.

Say Necklace1 has a matching earring Earring1. Here is my question: if I choose Necklace1 in filter, how can I see

information for Earring1?

Ivan_Bozov
Luminary
Luminary

How about something like this:

If(GetFieldSelections(Item)='Necklace1', Sum({<Item={'Earring1'}>}Sales),

If(GetFieldSelections(Item)='Necklace2', Sum({<Item={'Earring2'}>}Sales)))

vizmind.eu
ogautier62
Specialist II
Specialist II

Hi,

according to your model,

how do you choose B when you select A ?

regards

wanyunyang
Creator III
Creator III
Author

Hi Olivier, B is a matching product for A. In another table, two fields: one for item, another for matching_product.

wanyunyang
Creator III
Creator III
Author

Hi Ivan, thanks for helping. Is there a more standardized way? Necklace1 is Product, Earring1 is Matching_Product.

robert99
Specialist III
Specialist III

Hi

It should do it automatically if you model is set up to establish the product - matching product link

So if you select a product it will automatically show all the sub product details

wanyunyang
Creator III
Creator III
Author

Hi Robert, I was linking Product in table1 with Product in table2, which will be complex. Now I'm linking Product in table1 with Matching in table2, it works well.