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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Hierarchy

Greetings

I am not sure we can force hierarchical execution in Set Analysis. My Problem as follows.

I have the following fiedls

USER_ID,MMYY,  AMOUNT , TRAVEL, LODGING, FOOD_PUB, FOOD_REST, FOOD_FAST, MOVIES, HEALTHCARE

I want to find COUNT users who TRAVEL , Stayed in LODGING and Spent on atleast any ONE  FOOD  . Also SUM the  AMOUNT SPENT all these expenses.

To Count I have written the following Set Expression. This will forece to calculate anyone who spent on any one FOOD Item.

=COUNT(DISTINCT {<TRAVEL = {'>0'}> * <LODGING = {'>0'}> * (<FOOD_PUB = {'>0'}> + <FOOD_REST = {'>0'}>  + <FOOD_FAST = {'>0'}> )} USER_ID)

Can I use parentheses to Force Hierarchy? If not any other alternate way? I have the detailed posted in another thread http://community.qlik.com/thread/83793?tstart=0

Thank you

3 Replies
Not applicable
Author

Not applicable
Author

Thanks Rebeca the example provided is different from my request. What I need is as follows

By Using Bracket i combine C OR D OR E OR F. If C to F is >1 then the outcome is 1

A AND  B AND (C OR D OR E OR F)  --> This works but I am not sure we can force hierachy by using bracket.

But so far others have helped me to arrive at the equation as follows

A AND B AND C OR D OR E OR F  --> This does not yield into correct answer.

Hope some one can clarify.

Thanks

Not applicable
Author

57 views but did not get direction for a small clarification.. any experts there can help?