Skip to main content
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 (4)
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
Specialist III
Specialist III

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

QFabian
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