Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
roland74
New Contributor III

QlikView set analysis filter on all fields from one table

Hi all,

Does anyone know if it's possible to have set analysis react only on filters that are set on the fields of one table and disregard the filters on fields of all other tables?

I want to sum the field Quantity only if a filter is set on any field from the Calendar table.

I've found an example that does the opposite, it disregards the filters on all fields of the Calender table, but I can't find a way to turn it around.....

=sum({$<[$(=Concat({1<$Table={'Calendar'}>}distinct $Field,']=,[')&']=')>} Quantity)

Does anyone have a fix for this?

Thanx in advance!!

1 Solution

Accepted Solutions

Re: QlikView set analysis filter on all fields from one table

What if you add the second table name to inside set analysis:

=Sum({$<[$(=Concat({1 - <$Table={'Calendar', 'TableName2'}>}distinct $Field,']=,[')&']=')>} Quantity)

4 Replies

Re: QlikView set analysis filter on all fields from one table

Try this may be:

=Sum({1 - $<[$(=Concat({1<$Table={'Calendar'}>}distinct $Field,']=,[')&']=')>} Quantity)

roland74
New Contributor III

Re: QlikView set analysis filter on all fields from one table

Thank you for your suggestion,that almost dit the trick

The minus sign to invert the selection was the part I was missing and gave me the syntax I was looking for!

The correct syntax is:

=sum({$<[$(=Concat({1 - <$Table={'Calendar'}>}distinct $Field,']=,[')&']=')>} Quantity)

 

Do you btw have an idea how to add another table plus fields to this formula?

Re: QlikView set analysis filter on all fields from one table

What if you add the second table name to inside set analysis:

=Sum({$<[$(=Concat({1 - <$Table={'Calendar', 'TableName2'}>}distinct $Field,']=,[')&']=')>} Quantity)

roland74
New Contributor III

Re: QlikView set analysis filter on all fields from one table

Works great, thanks a lot!

Community Browser