Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am trying to create a chart that allows selection of expressions via a checkbox. I was able to get it to work when having one list box of metrics to select from. However, due to the amount of metrics in the list box I would like to separate into smaller list boxes. The issue is once I have separated into a few list boxes I cannot select metrics from each of the list boxes and have them display, it only displays selections from one list box at a time. Any suggestions on how to allow selecting from each list box an have all those selected display?
Here is how create the separate list boxes:
Metrics:
Load * Inline [_metrics, Flag
Sales %,1
SalesHrs,1
Training %,1
Training Hrs,1
Overtime %,1
Overtime Hrs,1
Recovery %,1
Recovery Hrs,1
Total Hrs,1
Unassigned %,1
Unassigned Hrs,1
Attrition Avg Headcount,2
Attrition Avg HP Headcount,2
Managed Leavers,2
Managed Attrition %,2
Total Attrition %,2
Total Leavers,2
Unmanaged Leavers,2
Unmanaged Attrition %,2
Headcount FTE,3
Headcount Heads,3
Joiners FTE,3
Prior Year End Headcount,3
Then in the listbox I am using an expression to display the metrics by "Flag". =If(Flag=1,_metrics)
For the Chart I have all the metrics listed and then am using substring counts to display. So in the general tab I have the calculation condition of GetSelectedCount(_metrics)>0 .
Then in the expression section I have each one listed and in the conditional section I have the formulas =Substring(Concat(_metrics,'|'),'Overtime Hrs') . This is an example of the overtime hrs conditional statement, obviously each expression has the specific title.
When I click on a metric from the list box with Flag 1 it displays fine, but the issue is when I want to also see a metric from the box with Flag 2 or 3, it is dropping the metric from the Flag 1 box.
Any way I can fix this??
Thanks!
Awesome, thanks! So a simple IF statement is all I needed. I knew it was something fairly simple I was missing. This works great, Thanks again!
Are the metrics in the listboxes all subsets of the same field (_metrics)? If so, you could use an alternate state trick.
Place each list box into a different alternate state (Create the states first in Document Properties | General). This means that you can independantly select items in each list box.
Now to 're-assemble' the selections, modify the expression like this:
SubStringCount(Concat({State1} _metrics,'|')
& '|' & Concat({State2} _metrics,'|')
& '|' & Concat({State3} _metrics,'|'), ,'Sales %')
SubstringCount is searching through the values for all 3 states. Add more states for more listboxes and update the expression accordingly.