Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - ignore some filters, but not others


I am new to Qlikview, so please keep this in mind when answering.

My problem is that I am trying to create a table that will filter the numerator to all selections, but the denominator to only some.  Specifically, I need a per capita number for a subset of a population and a total cost.  So I want to be able to filter the population to one thing in the denominator, and filter the costs to the population, but also to a subset of total costs.

For example, if we have total money spent on fruit by people per person.  But we want money spent on oranges by women.  So we need to be able to filter the denominator to women, and the numerator to women and oranges.

Thanks in advance for any help.

10 Replies
Not applicable
Author

sum( {$<FIELD_TO_IGNORE=, FIELD2_TO_IGNORE= >}, Sales )

this should help

Not applicable
Author

you can add all the fields which you want to ignore in the above expression

swuehl
MVP
MVP

Maybe like

= sum({<People = {'Women'}, Fruit = {'Oranges'}>} MoneySpent) / sum({<People = {'Women'}>} MoneySpent)

or if you have made selections on People and Fruit and want to ignore section on Fruit:

=sum( MoneySpent) / sum( {<Fruit= >} MoneySpent)

Not applicable
Author

For example, if we have total money spent on fruit by people per person.  But we want money spent on oranges by women.  So we need to be able to filter the denominator to women, and the numerator to women and oranges.


sum(Sales)/ sum( {$<Fruit=>}, Sales ) with  Women and Orange selected in the dashboard.

the numerator will respect your selection and will give you women who bought Oranges and the denominator will ignore the Fruit selection.

maxgro
MVP
MVP

I try

sum ( {$ <sex={woman},fruit={orange}>}  [money spent])

/

count({$ <sex={woman}>} person)

but better if you can post your qlikview doc

You can also search in help for set analysis

or read this doc  Set Analysis: syntaxes, examples

or search google for set analysis wizard

Not applicable
Author

Sorry Swuehl, did not mean to duplicate your reply. My page did not refresh while I was replying to this

Not applicable
Author

Thank you, I think I can work with your answers.  I really appreciate the quick response.  I was told this is an excellent forum, and was apparently told correctly.

nizamsha
Specialist II
Specialist II

=sum({$<gender={"Woman"},furits={"Orange"}>}sales)/

sum({$<gender={"Women"}>}Sales)

maxgro
MVP
MVP

Please close this discussion by giving Correct and Helpful answers to the posts which are useful for you.  It helps others in finding answers for similar scenarios. Thanks and good Qlik.