0 Replies Latest reply: Nov 18, 2016 2:45 PM by Heather Chamblee RSS

    Sorting a Stacked Bar Chart

    Heather Chamblee

      I have a stacked bar chart where my x-axis is Month, and y-Axis is NETPOS and my stacked components are ITEMCOMPID.  I want my chart to plot the NETPOS in each month and sort by GENERATIONCOSTPMW of each ITEMCOMPID.  My data structure has the NETPOS and GENERATIONCOSTPMW under the same list box so I am using set analysis to filter on the Variables I want to plot and sort. the actual values are in STATVALUE.

       

      I create a stacked bar chart with the following steps:

      Dimensions: Month and ITEMCOMPID

      Expressions: Generation = Aggr(sum({$<VARIABLEID={'NETPOS'}>}STATVALUE),Month,ITEMCOMPID)

      Sort: Month by Numeric Value

              ITEMCOMPID by Expression = Aggr(sum({$< VARIABLEID={'GENERATIONCOSTPMW'}>}STATVALUE),Month, ITEMCOMPID)

       

      When I do this for a single month my sort looks good, but if I look at all 12 months the sort in Jan only is not the same as Jan when I have all 12 months plotted.  It looks like it is keeping the same sort order across all 12 months.  How do I enforce the plot to stack the ITEMCOMPID in each month by the GENERATIONCOSTPMW in each month?