Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
m_woolf
Master II
Master II

Set analysis - ignores filters on all fields but one

Can set analysis ignore filtering on all but a single field?

I know that:

     sum({1}Fieldname)

sums all values in Fieldname, ignoring any filtering.

I want a similar expression that will ignore filters on all fields except FilterFieldname.

1 Solution

Accepted Solutions
whiteline
Master II
Master II

sum({1<FieldToKeep=P(FieldToKeep)>}Fieldname)

View solution in original post

18 Replies
MayilVahanan

Hi

     Something like this,

     = sum({<month =, year=, day=>}fieldname) its exclude the month,year,day fields alone.

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
m_woolf
Master II
Master II
Author

Yes, but my application has many fields. Is there a way to exclude all fields except a single field?

It is not feasable to list every field but one in the expression.

whiteline
Master II
Master II

sum({1<FieldToKeep=P(FieldToKeep)>}Fieldname)

millnet-maho
Partner - Contributor III
Partner - Contributor III

This works when you've made selections in FieldToKeep, but not in the more general case. Say you have

sum({1<Field1=P(Field1), Field2=P(Field2), ..., FieldN=P(FieldN)>} Fieldname)

because you want selections in any of those fields to affect the set of values in the sum, but no others. But selections in other fields may affect the set of possible selections in Field1 ... FieldN, which means that they still affect the sum too, indirectly. For example, Field1 might be Month and Field2 might be Weekday; if you select a SalesUnit that never had a sale on a Sunday, then Sunday will be excluded.

liviumac
Creator
Creator

hello

so has anyone solved this problem?

P function works most of the cases, but as outlined by Magnus, it does not work in all and if you are using it without being aware of its limitations, it will provide misleading results.

for me it would be great if i could ignore all selections but one or two in a sheet - this is very useful when you want to calculate the share of a selected dimension in the "total population", but the "total population" is not the total population in your database, but the total population as of a certain date, for example

so I want to be able to calculate a measure for the total population as of a certain date, regardless of what selections I make in a certain sheet

of course, I have many selectable dimensions, so it is unpractical to use a set modifier because I have to list in it each and every selectable dimension

thank you

LM

natebrunner
Contributor III
Contributor III

Agree...looking for same thing.

oscaraguilar
Contributor
Contributor

It works too, just in case you want to exclude many fields, not all but a single field, for me, your idea work to my solve my issue.

mongolu
Creator
Creator

Hello.

Did you found any solution to this problem?

mkelemen
Creator III
Creator III