Select nth value from multiselect-listbox in custom expression



is it possible to select the nth value from a multiselect listbox in a custom expression?

Say the listbox contains values like:


red = selected values (it doesn't display correctly, so just imagine A and B are selected)

I have columns in my data-table named like Bookings_A, Bookings_B, Bookings_C, SecretNumber_A, SecretNumber_B, SecretNumber_C

Depending on the Value selected in the list box,

I want to create a Barchart, where the listbox value is on the trellis axis and for each trellis the formula is depending on the listbox value selected.

So for the trellis panel containing A, I want to calculate sum(Bookings_A) / sum(SecretNumber_A), for the trellis panel containing B, I want to calculate sum(Bookings_B) / sum(SecretNumber_B), and so on.


I've looked into $map and $esc, but couldn't quite get it to work. Any ideas?

Thank you!

My Spotfire Version: 7.10.1

(1) Answer