Create dynamic segments in line chart

I have sales data over time by region and industry. I want to create a line chart where user can choose to break it down by region or industry. I’m not sure whether the Field ‘Color’ can be updated by the user through a dropdown.


Yes you can do this using parameters and a control.

  1. Build a static text parameter (e.g. pColor)
  2. Create a control on top of this parameter with 2 values- Region and Industry- users will make the selection on what they want the line chart to show using this control.
  3. Create a calculated field: if the parameter value is Region then use the Region field, else use the Industry field: ifelse(${pColor}=‘Region’, Region, Industry).
  4. Place this field in the Color field well of your line chart.

Hope this helps.

1 Like