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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If condition when two values selected in a select field box

Hi,

I have this if condition depending on the field GRUPO_MERCADO which is on the sheet:

=if (GRUPO_MERCADO='Internacional' OR GRUPO_MERCADO='Local' OR GRUPO_MERCADO='Gratuidades',0,

-sum({<Facturacion={'Vta.España'}>}SDO_EU_PER))

I would like it makes a '0' even when there is two values selected in the select field box in the sheet.

The OR condition works well  but not when there is two values selected.

Thanks

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

While there is more than one selection in a field you cannot use simply the field to get values. Because it returns you null only. You have to use getFieldSelections or Concat depends upon your need.

Check with this

if(WildMatch(getfieldselections(GRUPO_MERCADO, ';'), 'Internacional', 'Local', 'Gratuidades'), 0, -sum({<Facturacion={'Vta.España'}>}SDO_EU_PER))

Hope it helps

Celambarasan

View solution in original post

1 Reply
CELAMBARASAN
Partner - Champion
Partner - Champion

While there is more than one selection in a field you cannot use simply the field to get values. Because it returns you null only. You have to use getFieldSelections or Concat depends upon your need.

Check with this

if(WildMatch(getfieldselections(GRUPO_MERCADO, ';'), 'Internacional', 'Local', 'Gratuidades'), 0, -sum({<Facturacion={'Vta.España'}>}SDO_EU_PER))

Hope it helps

Celambarasan