Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey all,
I have a table in Qlikview with several expressions in it. I want to make them appear when they are selected.
Under the presentation tab of my table properties I select the conditional option. If I write here: ListboxName= 'Columname'
then the column will appear on selection and disappear otherwise. The problem I have is when selecting multiple values this doesn't work anymore.
I think I should work with an if statement and maybe the getSelectedfields function but I have no idea how to do this.
Is there anyone who can help me with this?
Thanks in Advance,
Jens
Hi Jens,
try this in the cond option:
Len (getfieldselections ( Fieldname)) = 0
Hints:
Fieldname is the table-fieldname. Don't use an if-clause in the condition term!
Regards, Roland
Thanks for the response.
Your statement works but I still have the issue that he doesn't show all the values I select.
I have a listbox with all my columnnames and I want the column to become visible in the table when I select it in the listbox.
I can do this for each value but not when I select several options in the listbox.
In your statement I compare whether there is a value selected but I want to check for specific values.
Regards,
Jens
Jens
Assuming that ListBoxName contains column names that you want to conditionally display, then perhaps something like:
=Wildmatch(GetFieldSelections(ListboxName), '*ColumnName1*')>0
If you want the selection to depend on mu;tiple selections, then add more compare strings like this:
=Wildmatch(GetFieldSelections(ListboxName), '*ColumnName1*', '*ColumnName2*')>0
Add as many column names as you need.
Note that if you could possibly select more than 6, then GetFieldSelections needs to be written like:
GetFieldSelections(ListBoxName, ',', 20)
just replace 20 with the maximum possible to likely number of column selections.
Jonathan
Oh, this is a little bit different than i thought before. But now I understand you better and I know what you want. What do you use for your listbox ? $Field?
.... and I follow up Jonathan ......
My listbox contains the names of my columns.
When I select one or multiple values in my Listbox I want the selected columns to become visible in my table.
Jens
Then my earlier post should work for you
Jonathan
Thanks for the response Jonathan.
You solution also works but not when I select multiple values.
When I use:
Wildmatch(GetFieldSelections(ListboxName), 'Column1')>0 in the conditional field of my expression (in the presentation tab of the chart properties)
It shows Column1 in my table(graph) when I select it in my listbox
But when I select multiple values in my listbox I cannot see them in my table anymore.
I want that all the columns that I select appear in my table and this in a flexible way. So when I select only on than only that column should appear, but when I select multiple I want all of the selected to appear.
I am trying to reach this by using the conditional option in the presentation tab of my chart properties. Maybe this isn't the place to do this.
I think I need a condition for each column (expression) saying that if it is in the selected fields show it.
I hope that you have an idea of what I want to reach
Kind regards,
Jens
Hi,
lets try to clear the situation:
I have two database-fields (Type and Amount) and a listbox containing $Field. Then I can use
This should help. Take care of the ( * ) !
To Jonathan:
I can't afford "GetFieldSelection(ListBoxName); My function needs a Fieldname as Parameter ?!?!