Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

dimensions with condition

hi,

i have a straight table with two dimensions.

i want that the table will show only two values of one of the dimensions.

lets say-

my dimension 'country'

the values i want to show 'USA' 'israel'

i tried to put  in the enable condition: if(country='USA' or country='israel',1,0)

its not working.

can someone help me?!

1 Solution

Accepted Solutions
iktrayanov
Creator III
Creator III

Use calculated dimension. something like this

If(match(country,'USA','Israel') > 0,country)

Keep in mind that match is case sensitive.

View solution in original post

12 Replies
Not applicable

Hi,

Try this  if(country='USA' and country='israel',1,0)

Thank you

Vardhan

iktrayanov
Creator III
Creator III

Use calculated dimension. something like this

If(match(country,'USA','Israel') > 0,country)

Keep in mind that match is case sensitive.

Carlos_Reyes
Partner - Specialist
Partner - Specialist

Why don't you use Set Analysis in your expressions?

Place Country as your Dimension and restrict the Country values using Set Analysis.

Try:

Sum ( {$< Country= {'USA', 'israel'}>}  ValueField)

luis_pimentel
Partner - Creator III
Partner - Creator III

A calculated dimension like: If(match(country,'USA','Israel') > 0,country) is the solution you are looking for.

luis_pimentel
Partner - Creator III
Partner - Creator III

Using just Set Analysis in the expressions, the other values will be listed anyway.

Carlos_Reyes
Partner - Specialist
Partner - Specialist

Nope if you only have that expression... If you have more than one expression you only have to place the Set Analysis filters in all the other expressions... It's a different approach.

EDIT... Review the attached file.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

and "Suppress When Value is NULL" checked on the Dimension tab. Otherwise you may get three rows.

Peter

Not applicable

Hi Adi,

Two things:

  • Use the following as calculated dimension : =if(match(Country,'USA','Iran'),Country)
  • Check the 'Suppress when value is Null' option

Attached is an example

Thanks

AJ

Not applicable

This is informative. Thanks for sharing it. Didn't know about this.