Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Diinkant
Contributor III
Contributor III

Show column if data from another table = string

Hi Guys,

I am new the Qlik development so unsure how string expressions work. I am wanting to hide a column in a pivot table if a value in another table = string.

E.g if(brand = 'TIMBERLAND') or i think in Qlik it would be if([brand],'TIMBERLAND')?

 

Diinkant_0-1666128001229.png

Cheers,

 

Labels (2)
1 Solution

Accepted Solutions
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @Diinkant 

in qlik the if statement is 

If(condition,do something, do something else)

But in this case you only have to use

brand = 'TIMBERLAND'

it will return 0 and hide when is false and return -1 and show when is true.

off course, according to users selections if brand field has more possible values this is going to return false.

and if user select  TIMBERLAND Or the others selections reduce this field to this only possible value, it will return true.

 

hope this helps.

best,

Help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 🙂

View solution in original post

5 Replies
Diinkant
Contributor III
Contributor III
Author

I should mentioned i have tried if([Brand],'BIRKENSTOCK') and still doesn't work.

alinabo12
Contributor
Contributor

I think this is the standard or classical approach to do this. A left join would keep the tuples with 'NA' in the response. Do you have appropriate yearly calendar indexes on your tables?

 
ckarras22
Partner - Creator
Partner - Creator

GetFieldSelections can be used.Do you want to share an example, because the "if a value in another table = string" is very vague?

RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @Diinkant 

in qlik the if statement is 

If(condition,do something, do something else)

But in this case you only have to use

brand = 'TIMBERLAND'

it will return 0 and hide when is false and return -1 and show when is true.

off course, according to users selections if brand field has more possible values this is going to return false.

and if user select  TIMBERLAND Or the others selections reduce this field to this only possible value, it will return true.

 

hope this helps.

best,

Help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 🙂

Diinkant
Contributor III
Contributor III
Author

Legend mate, figured it out last week but this helped heaps. Marked it as the best solution!