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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
maxtromb
Contributor
Contributor

How to add an expression to a list box

Hi everybody,

I create a variable in a pivot table with this function:

if(sum(SCONTRINI)>=0 and sum(SCONTRINI)<2,'CASUAL',

if(sum(SCONTRINI)>=2 and sum(SCONTRINI)<6,'MEDIUM',

if(sum(SCONTRINI)>=6,'LOYAL')))

and I call it 'USE' and it works:

QV_LIST.gif

Now, I want to insert this variable in a list box, I want to filter with 'USE'

I try it with list box -> field -> <expression> and inserting this function:

Aggr(

if(sum(SCONTRINI)>=0 and sum(SCONTRINI)<2,'CASUAL',

if(sum(SCONTRINI)>=2 and sum(SCONTRINI)<6,'MEDIUM',

if(sum(SCONTRINI)>=6,'LOYAL'))),SCONTRINI)

I only see this:

QV_LIST2.gif

I can select it but I don't filther anything in the other objects

1 Solution

Accepted Solutions
sunny_talwar

Try this

Aggr(

if(sum(SCONTRINI)>=0 and sum(SCONTRINI)<2,'CASUAL',

if(sum(SCONTRINI)>=2 and sum(SCONTRINI)<6,'MEDIUM',

if(sum(SCONTRINI)>=6,'LOYAL'))), NRO_SOCIO)

View solution in original post

2 Replies
sunny_talwar

Try this

Aggr(

if(sum(SCONTRINI)>=0 and sum(SCONTRINI)<2,'CASUAL',

if(sum(SCONTRINI)>=2 and sum(SCONTRINI)<6,'MEDIUM',

if(sum(SCONTRINI)>=6,'LOYAL'))), NRO_SOCIO)

maxtromb
Contributor
Contributor
Author

thanks a lot! it works!