Hello everyone,
I have a table with a grouping column and several response variables.
New Table( "Test",
Add Rows( 7 ),
New Column( "GROUP",
Character,
"Nominal",
Set Values( {"a", "b", "c", "d", "e", "f", "g"} )
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [7, ., 6, ., 4, ., 2] )
),
New Column( "Y 2",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [7, 6, 2, 3, ., ., .] ),
Set Display Width( 49 )
)
)
I would like to create a bar chart with a column switcher.
Graph Builder(
Size( 527, 448 ),
Show Control Panel( 0 ),
Variables(
X( :GROUP, Order By( :Y, Ascending, Order Statistic( "Mean" ) ) ),
Y( :Y )
),
Elements( Bar( X, Y, Legend( 4 ) ) ),
Column Switcher( :Y, {:Y, :Y 2} )
)
My problem is that I do not want to display levels with no data. In other words, I do not want to see levels "b", "d" and "f" for Y and levels "e", "f", "g" for Y2.
I tried to use a "where" clause but unfortunately it is not taken into acount by the Column Switcher.
Do you have any idea of how we could do that?
Thanks in advance!