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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
simonb2013
Creator
Creator

SetAnalysis : multiple filters

My data is a list of table names, field names, key field names 

I have a table, and a measure that works as a logical AND filter.
If a user selects 2 Key Field values, they will see only tables that have BOTH of those fields.

=Sum({<TABNAME = {"=COUNT(KEYFIELDNAME)=$(vKeyFieldsAvailable)"} >} 1)

I can also do this;  the same, but for the 'field' column as opposed to the 'keyfield' column.
=Sum({<TABNAME = {"=COUNT(FIELDNAME)=$(vFieldsAvailable)"} >} 1)

Problem is when I want to use both if these filters together.
I tried this below, but it just results in an error - at least just displays null values.

=Sum({
              <TABNAME = {"=COUNT(KEYFIELDNAME)=$(vKeyFieldsAvailable)"} >
             ,<TABNAME = {"=COUNT(FIELDNAME)=$(vFieldsAvailable)"} >
} 1)

I'm not that confident in the mechanics behind this, so hoping someone can help educate me as to where I'm going wrong !?

 

Thanks

Labels (2)
2 Replies
sunny_talwar

How about if you try this

=Sum({TABNAME = {"=Count(KEYFIELDNAME) = $(vKeyFieldsAvailable) and Count(FIELDNAME) = $(vFieldsAvailable)"}>} 1)

or if the condition is or, then this

=Sum({TABNAME = {"=Count(KEYFIELDNAME) = $(vKeyFieldsAvailable) or Count(FIELDNAME) = $(vFieldsAvailable)"}>} 1)

 

simonb2013
Creator
Creator
Author

Thought this had worked .. apparently not 😞