Focal Point
[SOLVED] Changing the order of stacked bar

This topic can be found at:

May 21, 2013, 10:15 AM
[SOLVED] Changing the order of stacked bar

I'm trying to change the order of a stacked bar and instead of ordering the entire bars (based on the total) I'm getting the series seperated and eack series is sorted seperately.

Does anybody know how to sort the stacked bars correctly?


This message has been edited. Last edited by: FP Mod Chuck,

WebFocus 8002M Windows, All Outputs
May 22, 2013, 07:16 AM
Search the forum with "graph sort order". There are a lots of examples how to do this.

WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
May 22, 2013, 07:34 AM
Thanks Alex, the problem is that we only have access to the info assist GUI without the ability to change the report code.

I can change the sort order easily but it will split the series. I didn't find a way to do it in the info assist UI.

WebFocus 8002M Windows, All Outputs
May 23, 2013, 03:08 PM

Can you post a sample code or an image to show us what you are trying to solve?

May 26, 2013, 04:30 AM


WebFocus 8002M Windows, All Outputs
June 05, 2019, 06:00 PM
I know this post is old, but I ran into this issue, and resolved it, so I figured I'd update this thread.

In InfoAssist, if you are building a stacked bar chart, you can split your measure with a By Field and a Legend Series field. The Legend Series field becomes your bar 'slices,' and the By Field controls the number of bars.

Problem: If you sort by the Measure, you turn the bar slices are turned into discrete bars, which are no longer stacked


1. Define a field for every bar slice, then add the fields as Measures. Something like IF EQ 'Value1' THEN ELSE 0, repeated for every value in the Legend By field
2. Do not use any field in the Legend Series. Do add you main By Field to create the X-Axis bars
3. At this point, the chart is still not sorted. Add the as another measure, which will make your chart double what it should be (measure field plus the discrete bucketed define fields)
4. Sort descending on the measure field you just added, then right click and hide the measure field

Now you have a stacked bar chart that is sorted by highest total value, as desired



-WebFOCUS 8.2.01 on Windows