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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
satheshreddy
Creator III
Creator III

how to achive both columns data we have in some other column data using filter.

Hi Experts,

I have below data..

   

Company1Company2Company3
A1D1A1
B1E1D1
C1 B1

here my filters like below.

  Filter  

A1
NON A1

once I click A1I need to see Company1 column data and when I click NON A1 I need to see Company2 data.

when am going to select NON A1 and A1 I need to see what ever we have both columns data in company3 column data.

How we can Achieve this

Regards

Sathish

12 Replies
tresesco
MVP
MVP

Ideally it's AND-Mode issue as I already mentioned. However, you can also try it with a-kind of alternate approach (set analysis) which would be not so clean approach. When you select two types your output is against a to-be expression like:

=Count( DISTINCT {<company=p({<policy={'fire'}>})>*<company=p({<policy={'accident'}>})>} company)

For multiple values and to make it dynamic, i.e. when more types are selected, the expression has to be like:

=Count( DISTINCT {<company=p({<policy={'fire'}>})>*<company=p({<policy={'accident'}>})>*<company=p({<policy={'AnotherType'}>})>} company)

and so on,...


You could create a variable to generate this all-type combination in the expression with p(), like:

Variable2 : Concat(DISTINCT '<company=p({<policy={'&chr(39)& policy& chr(39)&'}>})>', '*')

And another variable for final expression

Variable1 :  ='Count(DISTINCT {'&$(= Variable2)&'} company)'


Expand the variable in a text box: =$(Variable1)


antoniotiman
Master III
Master III

Hi,

try this

=Count({<company={"=count(DISTINCT policy)=Getselectedcount(policy)"}>} DISTINCT company)

tresesco
MVP
MVP

Clever One!