Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Change the X-axis values based on the filter

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Change the X-axis values based on the filter
 Login/Join
 
Platinum Member
posted
Hi Everyone,

I am trying to create a bar chart where y-axis is an amount and x-axis is a date(ex:01/14/2019). My plan is to create a conditional x-axis which works like this.When I select a date range that is more than 3 months x-axis should plot amount by "date" but show alternate(Sunday to Sunday)weeks as labels(Ex:Sun Jan 13, Sun Jan 27 etc).When I select date range that is more than a year x-axis should plot amount by "bi-weekly" intervals on graph but show "Months" as labels(Ex: Jan '19). Please provide if you have any inputs on how to create this in webfocus. Thank you very much.

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


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 106 | Registered: June 26, 2018Report This Post
Virtuoso
posted Hide Post
If you don't already have these period defined (Sun Jan 13, Sun Jan 20, …) within a Date (calendar) table from which you can read from, you need to create them as you will do with any other programming language.
With WF you will use DEFINES or COMPUTE.
Assign a DEFINEd/COMPUTEd period for each available date.

Ideally, you should build a Date table where for each date you will assign its week value and any other period you need.
Then join this Date table to your data to have each data row linked with its proper Date table record. This way you will have access to your period fields.
Also it will become available to any other report since it's going to be a data table (Date table) and not specific to a report (hard coded).


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Hi Martin,

Thanks for your input. Let's say I have these available at the data source and I have created a bar chart with amount in Y-axis and Date in X-axis. Can you let me know how to change the labels on x-axis based on the selected time range like I mentioned above.


quote:
Originally posted by MartinY:
If you don't already have these period defined (Sun Jan 13, Sun Jan 20, …) within a Date (calendar) table from which you can read from, you need to create them as you will do with any other programming language.
With WF you will use DEFINES or COMPUTE.
Assign a DEFINEd/COMPUTEd period for each available date.

Ideally, you should build a Date table where for each date you will assign its week value and any other period you need.
Then join this Date table to your data to have each data row linked with its proper Date table record. This way you will have access to your period fields.
Also it will become available to any other report since it's going to be a data table (Date table) and not specific to a report (hard coded).


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 106 | Registered: June 26, 2018Report This Post
Virtuoso
posted Hide Post
You can do something such as this where &BY1 will be assigned to proper desired x-axis field
But it's also possible that you will need a "fake" field to have them order properly such as a real date and not a text field. Otherwise it will be ordered alphabatically
-SET &BY1 = DECODE &SELECTION ('BYWEEK'  DATEWEEK
-                              'BYMONTH' DATEMONTH
-                              ELSE      DATEDAY);
GRAPH FILE xyz
SUM VALUE
BY &BY1
END
-RUN


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Hi Martin,

I will try this way. Thank you very much.

Regards
BI DEV


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 106 | Registered: June 26, 2018Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Change the X-axis values based on the filter

Copyright © 1996-2020 Information Builders