Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
xthojanalyst
Contributor
Contributor

Listbox Cyclical Group only show values if meet condition

I am trying to show values in a list box if meet certain conditions

ID Met Location Reg
1 1 USA NA
2 1 USA NA
3 1 FRA EUR
4 0 ITA EUR
5 1 CH ASIA

 

As an example, let's say I have a dataset like this . I created a cyclical group 'Place' with the dimensions "Location and Reg".  I want to create a list box using that cyclical group 'Place' to show only values where Met=1, so essentially ITA would not show up in the list box as a possible selectable value if cycle through to Location.  

Is this possible to do with a cyclical group in an if statement? I know I can just use if(Met=1, Location) as an expression if it was just that one dimension.

Labels (3)
6 Replies
jwaligora
Creator II
Creator II

Hi.

Where are you placing your expression? 

A 'version' of your exact approach works in this configuration:

jwaligora_2-1694727132293.png

but selecting EUR from the list box does also automatically enforce a selection of Met = 1 on the overall data set...which may or may not be acceptable behavior to you.

J.

xthojanalyst
Contributor
Contributor
Author

If it was just a single dimension I would just add it as an expression in Dimensions.  But this approach you have above I'd have to write for all dimensions when writing as a grouper.  And this is an example dataset, this would have thousands of rows and columns, so the EUR selection would not be feasible.  

jwaligora
Creator II
Creator II

I don't think I understand at which point the data size becomes an issue. The expressions are written at time of group definition and their number is equivalent to the number of dimensions in the cyclical group. Are you saying you intend to cycle through thousands of dimensions?

xthojanalyst
Contributor
Contributor
Author

No, but I'd have to write an expression for every dimension then for the same cycle group.

So example (added below), if I have cyclical group X with Location and Reg.  I want one list box where it is limited to where met=1, so like your example above.  But I want that same list box, but this time with only if column X =1, then another with if(Y=1), so on and so forth.  It won't be thousands of dimensions to cycle through but could be say 10 or so.  I'd have to rewrite those if statements for each listbox for each dimension in the cyclical group.  

ID Met Location Reg X Y Z
1 1 USA NA 1 1 0
2 1 USA NA 0 1 0
3 1 FRA EUR 1 1 0
4 0 ITA EUR 1 0 1
5 1 CH ASIA 1 0 0
jwaligora
Creator II
Creator II

Should all these list boxes be visible simultaneously?

It almost sounds like using either buttons or triggers to force the Met=1 (X=1, Y=1, etc.) selections might be a better approach.  That would result in a single list box.

jwaligora
Creator II
Creator II

...you can also store the column name in a variable. Then you'll have a single box that changes content depending on what the variable is set to. 

jwaligora_0-1695059424776.pngjwaligora_1-1695059447761.png