Remove default floor function while dividing a column by another in OBIEE — Oracle Analytics

Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Remove default floor function while dividing a column by another in OBIEE

Received Response
61
Views
2
Comments
DollyG
DollyG Rank 5 - Community Champion

Hi,

I have a requirement in which I need to Calculate failure percentage using (failure/(failure+ success)) *100

Failure and success are the two columns present in my table. When I am applying this formula in analysis, I get weird results.

By analysing the query generated by Obiee, I could find that it applies floor function by default. On removing the floor function and running on oracle gives me the correct results.

So, can anyone please tell me, how should I remove this default floor function in obiee to get the correct results?

Help will be appreciated

Regards,

Dolly

Answers

  • Hi,

    Aren't you just facing the typical "integer division" ?

    When dividing or multiplying with integers the result will also be an integer.

    If your "failure" and "success" are integers you need to cast at least one as double or you will always be doing an integer calculation. If both are already double then use "100.0" instead of "100" to keep the multiplication as a double multiplication.

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    +1 to Gianni. Probably just INT / INT = INT. Common error.