The following Expression always return 0.00% in a custom OBI EE Repor

Check box “data is dense”
January 21, 2009
Users missing cache
January 26, 2009

Something else, I’ve found. I suggest always adding 1.00* when working with non-integers, just for sake of convenience.

(Customers.”Total Customers” / sum(Customers.”Total Customers”)) * 100
The problem was caused because that Integer Data Type values are involved in the calculation. If the calculation is performed on Integer values, then the correct answer is ‘0’.

When a Grand Total is specified, then the Data Type is promoted to Double Precision. If the operation is performed on a Double Precision field, then non-zero values will be returned.


The solution to this issue and to ensure that non-zero values can always be returned in an OBI EE Report is by modifying the formula expression as follows: –

e.g. (1.0*Customers.”Total Customers” / sum(Customers.”Total Customers”)) * 100 or 1000*Customers.”Total Customers” / sum(Customers.”Total Customers”)

1 Comment

  1. Stacy says:

    This should work as well.

    Cast(Customers.”Total Customers” ) As double)/ sum(Customers.”Total Customers”)) * 100

Leave a Reply