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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jeevays7
Partner - Creator III
Partner - Creator III

display common values of two selected field value

Hi All,

I have a table like Below.

ID     Name     Value

1          A              5

2          B             10

3          A               4

3          B               6

when i select two id's from the above table , that is 1, 3. The table should show the common Name of selected Id's.

Result Table(pivot table):

Name     ID Value

A          1     5

            3     4

How can i get ?? please suggest any idea??

15 Replies
jeevays7
Partner - Creator III
Partner - Creator III
Author

Hi sunny,

Please explain this expression.

=Sum({<Name = {"=Count(DISTINCT ID) = GetSelectedCount(ID)"}>} Value)


how it will work??

sunny_talwar

Is it working or not? I guess before I explain anything it might be good to know if it serves the purpose or not

jeevays7
Partner - Creator III
Partner - Creator III
Author

Hi Sunny,


Thank you.

It is working...

can you please explain the expression???

=Sum({<Name = {"=Count(DISTINCT ID) = GetSelectedCount(ID)"}>} Value)

sunny_talwar

For each name, the inner expression (=Count(DISTINCT ID) = GetSelectedCount(ID)) is checking if the Count(DISTINCT ID) is equal to the Count of selected ID. To visually see this, create a chart with Name as dimension and two expressions

1) Count(DISTINCT ID)

2) GetSelectedCount(ID)

Based on your selections in ID, the final expression will only show those Names where the above two expressions are equal.

Does this make sense?

I would request you to close this thread if you got what you wanted by marking correct and helpful responses.Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

jeevays7
Partner - Creator III
Partner - Creator III
Author

Thank you sunny.

Where can i study these kind of set analysis?

i know only if we use any field name in set, we can use only that filed values.

=Sum({<Name = {"A"}>} Value)

but you using count in name filed and some condition.

=Sum({<Name = {"=Count(DISTINCT ID) = GetSelectedCount(ID)"}>} Value)


so i need this kind of set. please suggest this kind of expressions?

sunny_talwar

You can start here:

A Primer on Set Analysis

and then also look at this

Set Analysis: syntaxes, examples