Focal Point
***CLOSED bar / area graph?

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

September 19, 2015, 07:02 PM
RobertF
***CLOSED bar / area graph?
I am not sure how to ask this. It is possible because I accidently caused it to happen and then ended up having to delete the code to undo it.

Using the graph GUI in WF8, I want to plot a graph showing total dollars by month (Jan - Dec for TWO years; current vs prior year. The table structure is such that we have a month column (01-Jan, 02-Feb, 03-Mar etc) and a dollars column and a year column. We do NOT have two separate dollar columns, one for each year.

The trick is we want the current year represented with bars and the prior year resented as an area.

1) Is there a methodolgy to do this and if so can someone desccribe it.

2) I suspected you needed TWO measures so for fun I brought units in along with dollars. Sure enough I could set one a bar on as area.

3) I took units off the graph and suddenly my current year turned to area and prior to bar! No idea how this happened nor could I change it back. I saw nothing in the code causing this. Eventually I deleted the code and now have a simple bar graph again.

Is there a proven way to do what I want ...other than by accident!

This message has been edited. Last edited by: RobertF,


WebFOCUS 8206.08
Windows, All Outputs
September 20, 2015, 09:10 PM
RobertF
for now I created a hpld file creating two measures, Cur Year and Prior Year...still curious if it can be done with one field....


WebFOCUS 8206.08
Windows, All Outputs
September 21, 2015, 10:32 AM
Sandy Stulberger
You can "bucketize" using DEFINE fields as:
This_Year/D12=IF TRANS_DATE GE THIS_YEAR_START THEN AMOUNT ELSE 0;
Last_Year/D12=IF TRANS_DATE LT THIS_YEAR_START THEN AMOUNT ELSE 0;

This presumes you can find equivalent way to get TRANS_DATE and THIS_YEAR_START from your data.

With that you can pull your two years of data and graph This_Year and Last_Year without requiring a HOLD file.

Once you have your two series (This_Year and Last_Year) as Measures and Month as your X-Axis, then you can use the GUI to specify that one of them should be a Bar and the other an Area as follows:
1. Select the one that you want to be different (assuming that they are both Bars at the moment).
2. On the Ribbon you should see a tab for "Series". Click it.
3. On the left edge of the ribbon you will see a drop down for "Series". Pull that down and select the series you want.
4. On the Ribbon you will see an icon for "Type". Pull that down and you will be able to switch the selected series to Bar, Line or Area.

This message has been edited. Last edited by: Sandy Stulberger,
September 21, 2015, 11:51 AM
RobertF
Yes, essentially I did that.

I'll assume there is not a consistent way to do it with one measure....


WebFOCUS 8206.08
Windows, All Outputs