Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Profit shows NaN instead of result(Nan result calculating profit using a computed column)
Profit shows NaN instead of result [message #1820762] Tue, 28 January 2020 13:17 Go to next message
Stuart Oxley is currently offline Stuart OxleyFriend
Messages: 8
Registered: January 2020
Junior Member
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 Go to previous message
Stuart Oxley is currently offline Stuart OxleyFriend
Messages: 8
Registered: January 2020
Junior Member
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
Previous Topic: Page footer displays in wrong place when preview in Web Viewer/print the report
Next Topic:Survey as part of my bachelor thesis
Goto Forum:
  


Current Time: Fri Apr 19 15:04:56 GMT 2024

Powered by FUDForum. Page generated in 0.01793 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top