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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

add constraint on calculation

Hi,

I have an expression in a chart: Sum(OPCODE_COUNT*SUBSCRIBER_COUNT)

I want to add set analysis that will show the calculation for a specific value of a KEY disregarding users selections.

I wrote this expression : Sum({1<KEY_ID=2>}OPCODE_COUNT*SUBSCRIBER_COUNT)

I get an error sign under the second curly brackets.

what is wrong with the expression?

Thanks,

3 Replies
Not applicable
Author

can you make this one in the script ?

OPCODE_COUNT*SUBSCRIBER_COUNT as total

then try this one

Sum({1<KEY_ID=2>}total)

simondachstr
Specialist III
Specialist III

Try:

Sum({1<KEY_ID={'2'} >}OPCODE_COUNT*SUBSCRIBER_COUNT)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Close, the value you want to restrict on needs to be in curly braces too:

Sum({1<KEY_ID={2}>}OPCODE_COUNT*SUBSCRIBER_COUNT)


talk is cheap, supply exceeds demand