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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

Qliksense Show Column if setting

Hi,

I am trying to show a dimension in a table if any filter is made from that dimension.

 

EG.

City will only show in the table if a city is selected in a map or from a list.

I have created a variable

V.Show.City with a value of 1 and have tried in the show coulmn if FX box to add the following:

=if(v.Show.City=0,1,0)

this hides the city but it does not show when a city is selected.

Any advixe on this would be very helpful.

 

Labels (2)
1 Solution

Accepted Solutions
jneppl
Partner - Contributor III
Partner - Contributor III

Hi @davyqliks

 

you can try to use a function like "GetSelectedCount" that checks if you selected values in a specific field.

Try something like if(GetSelectedCount("Fieldname") > 0, 1, 0) as show condition.

 

Regards

View solution in original post

6 Replies
AdiPai
Creator II
Creator II

is the v.Show.City working ? did you test it seperatly ?

davyqliks
Specialist
Specialist
Author

HI,

I didnt, this is new to me and following instruction right now..., what's the best way to test please?

 

I am getting this in the settings

davyqliks_0-1612440452085.png

 

Thanks so much

QFabian
MVP
MVP

Hi @davyqliks , i think you dont need to put the if , just use the evaluation, like this :

$(v.Show.City)=0

or

v.Show.City=0

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
davyqliks
Specialist
Specialist
Author

hi @QFabian 

I really appreciate the help, thanks.

I have this variable:

davyqliks_0-1612449009418.png

and have added the suggested to the show column if setting in the dimension for City:

davyqliks_1-1612449073953.png

and 

davyqliks_2-1612449132034.png

 

but when i select a city from the map

davyqliks_3-1612449161304.png

 

the citry column does not show in the table..

I think maybe i am missing something.

Thanks in advance again

DQ

 

 

 

jneppl
Partner - Contributor III
Partner - Contributor III

Hi @davyqliks

 

you can try to use a function like "GetSelectedCount" that checks if you selected values in a specific field.

Try something like if(GetSelectedCount("Fieldname") > 0, 1, 0) as show condition.

 

Regards

davyqliks
Specialist
Specialist
Author

Thank you so much, this is exactly what i was looking for.

DQ