Friday, 3 June 2016

How to format Category Axis in Business Object with the Multiple Formats in a same Graph.

Requirement:
When User Selects Month then Category Axis should have formatting as 2004-Jan, 2005-Feb etc.
When User Selects Daily then Category Axis should have formatting as Sunday, Monday, Tuesday etc.
When User Selects Weekly then Category Axis should have formatting as Week-1, Week-2, etc.

Solution
Step 1:

Got to assign data (right click on the graph and select assign Data)


In category axis you can see (+) Button



Step 2:
Create 3 Formulas for three conditions
As
=If(UserResponse("Enter_PeriodType")="Daily";[Date])

It says when User has selected Period Type =Daily just display the Date, Now you need to format this date just click on the drop down button next to (+) and you can format date, Do the Custom Format to display date in “dddd” format

Refer Screenshot

Please not Custom Formatting is done in MODIFIED VERSION OF REPORT (Report open in Modify Mode) 









Now create your rest of the formulas as

For Weekly
=If(UserResponse ("Enter_PeriodType")="Weekly";”Week”+”-“+Week([Date]))

In this case even if you don’t do the formatting it will work fine.

For Monthly
=If(UserResponse("Enter_PeriodType")="Monthly";[Date])

Use costume formatting to
yyyy-Mmm



If in all the above formula if you have notice we have written the matching conditions of “IF” Statement

i.e. IF  (Your Condition matches ) THEN YES

We have not consider the ELSE option , Reason behind this is in, Business object 4.1 we got some good feature called ( HIDE )  in  format chart properties you can set HIDE WHEN EMPTY J  and you will get your desire Output
Just right click on the Category axis area and then you can set as below



Hence we can achieve desired formats for our date/numbers/percentages etc. whichever we want.

As we know that Custom Formatting (Previously known as ALERTS) is not working on Chart in 4.1 we can achieve the desire Output by using this method.


Thanks you all….!!!!!!

Mayur. Patil