Profit shows NaN instead of result [message #1820762] |
Tue, 28 January 2020 13:17  |
Eclipse User |
|
|
|
Hi,
Can someone please help?
How can I enter a computed column calculation without getting a NaN result for (homenettvalue-standardunitcost) / homenettvalue As Profit
Is there another way I can do the calculation?
I already have a margin calculation in SQL:
homenettvalue-standardunitcost & the profit calculation also works in SQL, by including (homenettvalue-standardunitcost) / homenettvalue As Profit in BIRT, gives zero division error, I have used ISNULL for other columns, this does not work for Profit.
In the expression builder I have tried:
row["Margin"]/row["homenettvalue"] which gives me either a result of 1 or 0
Using: row["homenettvalue"]-row["standardunitcost"]/row["homenettvalue"]
This gives me the homenettvalue result, using Aggregation: SUM gives me NaN
|
|
|
Re: Profit shows NaN instead of result [message #1841549 is a reply to message #1820762] |
Thu, 20 May 2021 11:14  |
Eclipse User |
|
|
|
Hi,
NaN is an error value that means not a number.
However, JavaScript considers the type of NaN to be number.
Infinity is a value so big it can't be represented by JavaScript numbers. It acts mostly like mathematical infinity.
Check the calculation and try again
|
|
|
Powered by
FUDForum. Page generated in 0.02734 seconds