I am using 6.0 version of BO. I am attaching the report to make it more clear.
How do I ‘Group’ the values - ‘less than 2%’ in ‘try’ column into ‘All Others’ as shown at the bottom. I have got this result manually by going to Data —> Variables—> group.
I would like to have this dynamically done, the criterion being, Group all the leadtypes which are less than 2% into ‘All Others’.
This is a better way of asking question. Pls consider this report not the previous report.
report is attached for the question to be more clear. Version 6.1 BO.
I want to group all the values in leadtype source (dimension) as “All Others” when the percent (measure) is less than 2, and display this in a Pie chart.
I am able to get this manually by Data—> variables-----> Leadtype Source—> group.
then I created Final variable inside which I made “All others” group which has all the lead types less than 2 which are InList( “Dealer/Distributor Referrals” , “Direct Mail” , “Magazines (Ads & PR)” , “Other MT” , “Other Web” , “PS Sales” , “Technical Support” , “Trade Show”).
How do I make this more generic instead of hardcoding the values??
When I use the If-then statement, the variable BOB turns into ‘Measure’ automatically. So, I have year(dimesion), Percent (measure) and BOB ( measure). Now if I am using these variables in the pie chart, then It is now displayed as I want it to be.
Instead if we can have a table as attached , then the pie chart comes out to be right. The table has Year(dimension), Percent ( measure) and Final ( dimension).
So, the basic key is to convert BOB (measure) into dimension variable. Is this possible?
Here percent is a measure. As a result of which, I am assuming, BOB is also a measure.
As a piece of info, I just have leadtype count ( measure) from the excel sheet ( data provider). I have then calculated the percent at the report level, which uses this formula.
= (<Lead Type Count(PD 2 in C:\Documents and Settings\gupta-3\My Documents\My Business Objects Documents\userDocs\Leads With Macros - Canada.xls)> / Sum(<Lead Type Count(PD 2 in C:\Documents and Settings\gupta-3\My Documents\My Business Objects Documents\userDocs\Leads With Macros - Canada.xls)>) In Report ) * 100
Here percent is a measure. As a result of which, I am assuming, BOB is also a measure.
As a piece of info, I just have leadtype count ( measure) from the excel sheet ( data provider). I have then calculated the percent at the report level, which uses this formula.
= (<Lead Type Count(PD 2 in C:\Documents and Settings\gupta-3\My Documents\My Business Objects Documents\userDocs\Leads With Macros - Canada.xls)> / Sum(<Lead Type Count(PD 2 in C:\Documents and Settings\gupta-3\My Documents\My Business Objects Documents\userDocs\Leads With Macros - Canada.xls)>) In Report ) * 100
But still I am not aware why the ‘BOB’ variable is becoming a measure. If this measure gets converted in into a ‘dimension’ variable, then the problem will be solved.
Give the exact syntax you are using for BOB variable.
If you use aggregate functions to create variables then they show as measures
I think there is an aggregate function max() or min() used for creating leadtype object. Just check into that.
I have a leadtype Count object which is not having any aggregate function. This is directly coming from the excel sheet dataprovider.
Now as I want to calculate the percentages, I am using this formula for percent:
= ( / Sum( ) In Report ) * 100.
Also as asked by you, exact code for BOB is:
= If < 2 Then “All Others” Else .
Now as variable ‘Percent’ is using SUM aggregate function, it is becoming a measure . And as BOB is using ‘Percent’ (indirectly SUM), it is also converted into a Measure. Correct me if I am wrong.
So is there any way to do convert ‘BOB’ into a dimension???
Can you still try mapping them to the pie chart.
Because the object (BOB) is returning character string though its a measure.
What you are expecting in the chart to show and what is displayed
A VBA data provider is a way to generate a “cube” based on your code. You would parse your input data from the query and generate the rolled-up values required for your chart. You would then be able to create the chart that you want.
There was a tech note on the Business Objects site a long time ago that provided the code to do this, but I have not kept a copy and it has been a long time since I looked. It may or may not be there anymore.
There is a sample showing how to create a VBA data provider in this article from BOB’s Downloads: