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: 
matthewp
Creator III
Creator III

Expression that ignores some selections and contains where conditions

I have an expression SUM(value)

i want to also have an expression that does 2 things

ignores all list box selections except 1 box

and

contains where conditions

(SUM(value) Where category = 'abc'/SUM(TOTAL value Where category = 'abc' OR 'xyz')

and only affected by selections from the yearperiod selection box nothing else

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

SUM({1<yearperiod  = $:: yearperiod, Category = {'abc'} >}Value)/SUM(TOTAL {1<yearperiod  = $:: yearperiod, Category = {'abc','xyz'} >}Value)

View solution in original post

5 Replies
jyothish8807
Master II
Master II

Hi matt,

Try like this:

sum({<category={'abc'},listbox1=,listbox2=,listbox3=>}value) /

sum({<category={'abc','xyz'},listbox1=,listbox2=,listbox3=>}total value)

listbox1, listbox2 are the listbox whose selection should not be effected.

Mention all the list box apart from yearperiod in set annalysis.

Hope it helps.

Regards

KC

Best Regards,
KC
matthewp
Creator III
Creator III
Author

by listbox1 do you mean the object id e.g. LB251 or the title?

MK_QSL
MVP
MVP

SUM({1<yearperiod  = $:: yearperiod, Category = {'abc'} >}Value)/SUM(TOTAL {1<yearperiod  = $:: yearperiod, Category = {'abc','xyz'} >}Value)

matthewp
Creator III
Creator III
Author

i want to also have where conditions inside the expression and divide by another expression (see question)

your on the right track though

MK_QSL
MVP
MVP

I have edited my reply..