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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Cognos does not consider comma in calculations! Help!

Started by lorenmario, 31 Jul 2014 09:57:12 AM

Previous topic - Next topic

lorenmario

Hello,

I have a question here, I migrated a report from version 7 to version 10.2 (with DQM), and the report in version 10 it presents some differences in values​​.

After much search, I discovered that Cognos is not considering the fractions when making the calculations. I did a simple test, I generated a new calculated item in report:

0.1 * 0.2

The result:

12

This is making the calculations using decimals are disregarded, if I have a number 375.30 Cognos considers the number 37530.

I tried to use commas, but also did not work.

Has anyone experienced this? Can you help me please?

Thank you!

CognosPaul

This is very odd. Can you confirm which content and product locales you're using?

Can you paste the SQL (native if any and Cognos) here?
Does this also happen with report expressions?
What happens if you try this calculation: (1/10)*(2/10)?

lorenmario

Hello, thanks for replying!!!

I tested here, I generated a report with two columns, the first calculating what you asked for, and the second column calculating
0.5 * 0.2
The result is this in SQL:


SELECT DISTINCT
     "Cli." "The" AS ""
     (1/100) * (2/100) The "Item1"
FROM
     "BDX". "BDTAB1" "Cli"
 
 
SELECT DISTINCT
     "Cli." "The" AS ""
     5.0 * 2.0 AS "Item1"
FROM
     "BDX". "BDTAB1" "Cli"
 
The result of the calculation you asked for is 0.002.
The result of the erroneous column is calculated 10.

I'm in Brazil, using the software in Portuguese.
Any suggestions?

Thankssss!!!

CognosPaul


lorenmario

I can not, because it is not an isolated case, there are many that are reporting this problem in many calculations.

I need to solve this problem because users create many calculations with fixed values​​, in this case was created an if calculation where the parameters are passed manually, and unfortunately Cognos is not identifying the commas of decimal numbers.

CognosPaul

I believe the issue can be traced to the locale you are using. All of the Portuguese locales use commas as the decimal separator.  Can you try setting the locale to English US and try again? While it's obviously not the correct solution, it will tell us if this is the problem.

lorenmario

Hi,
I've changed the configuration of Cognos to English, did this test yesterday but it did not work, the reports continue bringing incorrect results.

Does it have something to do with DQM?

CognosPaul

I haven't heard of DQM causing issues like this. What happens if you create a new framework model and test that calculation? Both in DQM mode and CQM?