If you are unable to create a new account, please email support@bspsoftware.com

Author Topic: How does a new user create a combined if-then, math and boolean calculation?  (Read 4828 times)

james899

  • Guest
I came from using Hyperion and I could create a computed item with a complex expressions in both the query side and the result or report side. I want to combine if-then-else logic with mathmatical, boolean, and special functions all in one expressions. A simple example is below.

if (sales >= 1000) AND (margin >= 2.5)
Then round(((sales * bonus)/ month_days), 2)
else round(sales/ month_days), 2)

Offline MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 11,707
  • Forum Citizenship: +677/-10
  • Cognos Software Muppet
Hi,

Creating these kinds of complex, expression-based calculations is beyond the capabilities of Query Studio, sorry. You would either need to have the calculation pre-defined as an item in your package by your Framework Manager modeller, or else use Report Studio if you want to define these calcs yourself in the report.

Regards,

MF.
Meep!

james899

  • Guest
Thank you for the reply. This is a shift for me. Reporting was formatting the query output into a graph or pivot and while I can do calculations at that step like a percentage, the major calculations were in the query. You are saying that with Cognos, the report studio does both the formatting and all the complex calculations. So case statements and if/then expressions are used in report studio and not queries?

Offline MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 11,707
  • Forum Citizenship: +677/-10
  • Cognos Software Muppet
The studios in Cognos 8 are simply user interfaces to allow reports to be defined.  Queries are generated at runtime based on both the underlying package definitions and the grouping/calculations/filters etc defined within the report.

Query Studio is targeted at Business Authors who have little or no technical experience, and consequently the UI is task-oriented, simple to use, and avoids use of complex expression editors.  Report Studio is for professional authors (power users) with much better technical skills, and allows use of expressions, manipulation of query items, multi-query reports etc.

Regards,

MF.
Meep!