Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Grouped Expressions

Hi all,

Is there a way in which expressions can be grouped so that the 'group' in question can be applied to numerous graphs. I have a number of grouped dimensions so that if, for eg i switch between month and week in one chart, all the other charts with this group will follow suit. I can't seem to find this option for expressions however. ie the grouped expression in one chart cannot be used in another?

Is there a way around this? I cant use expressions in the calculated dimensions to create a grouped dimension as my data will not be respresented properly.

thanks

1 Reply
johnw
Champion III
Champion III

While I've done very little with grouped expressions, my understanding is the same as yours - the grouped expression in one chart cannot be used in another.

Assuming we're right, I can think of at least one way around this limitation. Load some useless table disconnected from your main data with field names for each expression. Add a cyclic group for those field names. Then create a single expression that picks the right sub-expression based on the current field in the group. So something like this:

pick(match(getcurrentfield("Expression Group")
,'Average Inventory'
,'Max Sales Price'
,'Total Cost % of Budget')
,avg("Inventory")
,max("Sales Price")
,sum("Cost")/sum("Budget"))

Your next problem is that this fake "expression group" won't display because it isn't a dimension or a real expression group. You could create a second chart with with field group as the dimension, and then remove or use the background color for every single thing in the chart except for the field group. Make it transparent, set it to the top layer, and put it wherever you want on top of your original chart.

Not particularly simple to set up for the first time, but adding it to new charts is pretty easy - just cut and paste both the expression and the overlayed chart. When you pick the expression in one chart, it will then update all of the related charts.

There might be a better way, certainly.