help #MULTIVALUE and #DIV/0 Errors | SAP BusinessObjects

Wednesday, January 16, 2013

#MULTIVALUE and #DIV/0 Errors


 

#MULTIVALUE and #DIV/0 Errors

Here are two common BusinessObjects computation errors and their causes.

Error
Cause
Fix
#MULTIVALUE
You put a variable that could have multiple values in a cell that only allows a single value (e.g., the master section of a master/detail report).
Use Min or Max function, which by definition displays a single value.

#DIV/0
Your formula results in a division by zero in a particular cell.
Use an If Then Else statement to specify how to handle the error message.

#MULTIVALUE Example

You can download the sample report, errors.rep. 
In this example, you want have a query that returns a single value for year.  You want to display the year in the header of your report.  You create this formula:
=<Year>


The problem:  A single cell by definition can only display a single value of a variable.  Business Objects thinks there could be more than one value for <Year>, even though this query always returns a single value.  So it displays the #MULTIVALUE error.
The fix:  You use the maximum function to create this formula: 
=Max(<Year>)
The revised formula displays properly:
The fix works in this case because your query only returns one value for <Year>.  If your variable has more than one value, only the maximum value will display.

#DIV/0 Example

You can download the sample BusinessObjects report, div_zero_error.rep.
In this example, you create a variable, <average price>, with the following formula:
=<Sales revenue>/<Quantity sold>

The problem:
<Quantity sold> contains some zero values, so the #DIV/0 error message returns in those rows.
The fix:
Replace the <average price> column with a variable containing an IF THEN ELSE statement and the IsError() function (which checks to see if an error message has been returned):
= If IsError(<average price>) Then "N/A" Else FormatNumber(<average price> ,"$0.00")
Note:  Because “N/A” is a character string and <average price> is numeric data, we use the FormatNumber() function to convert <average price> to a character string.  Otherwise, we get the “Incorrect data type” error message.

0 comments:

Post a Comment