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.
Assuming that ListBoxName contains column names that you want to conditionally display, then perhaps something like:
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.
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
lets try to clear the situation:
I have two database-fields (Type and Amount) and a listbox containing $Field. Then I can use
- Wildmatch(GetFieldSelections($Field), '*Type*')>0 in the condition option of the column refering to Type
- Wildmatch(GetFieldSelections($Field), '*Amount*')>0 in the condition option of the column for Amount
This should help. Take care of the ( * ) !
I can't afford "GetFieldSelection(ListBoxName); My function needs a Fieldname as Parameter ?!?!
Got it working on the Actual table. I only did four fields (Actual, Actual % cont to Growth, Actual % of Total, Actual vs. PY (abs)) , I leave the rest for you.
Needed some special handling for Actual, as it is also contained in the other Measure values.
=If(Len(GetFieldSelections(Measure))>0, Wildmatch(GetFieldSelections(Measure, ',', 20), 'Actual', 'Actual,*', '*,Actual', '*,Actual,*')>0, 0)
=If(Len(GetFieldSelections(Measure))>0, Wildmatch(GetFieldSelections(Measure, ',', 20), '*Actual % of Total*')>0, 0)
Also needed to detect when no measure selected to suppress the display of all expressions.
=If(Len(GetFieldSelections(Measure))>0, ..., 0)
If you want to display all expressions if no selection, change the last 0 to -1....
=If(Len(GetFieldSelections(Measure))>0, ..., -1)
ConditionalDisplay.qvw 429.8 K