Focal Point
[SOLVED] Changing the order of stacked bar

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5407069036

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

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?

Thanks

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


InfoAssist
WebFocus 8002M Windows, All Outputs
May 22, 2013, 07:16 AM
Alex
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
Sagie
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.


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

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

Thanks!
May 26, 2013, 04:30 AM
Sagie
Absolutely:
Image
Thanks,

Sagie


InfoAssist
WebFocus 8002M Windows, All Outputs
June 05, 2019, 06:00 PM
Moogle
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

Solution:

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

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows