Skip to Content
author's profile photo Former Member
Former Member

Divide by zero error in Universe (BW Universe in IDT)

How to handle Divide by zero error in universe, when data source is BW.

I tried to create a CASE statement but its not working

CASE WHEN @Select(Report Objects\Forecast) = 0 THEN 0 ELSE ((@Select(Report Objects\Orders)/@Select(Report Objects\Forecast))*100) END

Getting following error when tried case statement

also tried ifElse condition

ifElse(@Select(Report Objects\Forecast) = 0, 0, ((@Select(Report Objects\Orders)/@Select(Report Objects\Forecast))*100))

but still getting the error.

Is there any other function to use?

Environment: Information Design Tool 4.1

Developing Design Studio Application (Webi not available to handle this)

1.PNG (14.6 kB)
2.png (30.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 25, 2016 at 07:38 PM

    use this.

    CASE WHEN @Select(Report Objects\Forecast) = 0 THEN toDecimal(0) ELSE ((@Select(Report Objects\Orders)/@Select(Report Objects\Forecast))*100) END

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.