Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Why does a computed column seem to add values across multiple rows
Migrateduser
I have a result set that looks something like:<br />
<br />
# Attempted, I_INVOICE_COST<br />
50,2.4828<br />
50,1.4496<br />
50,1.4656<br />
50,1.4664<br />
<br />
I create a calculated column like this to avoid division by zero<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var totalCost = 0;
if (row["I_INVOICE_COST"] != null) {
if (row["# Attempted"] != 0) {
totalCost = row["I_INVOICE_COST"] / row["# Attempted"];
}
}
totalCost;
</pre>
and all of the totalCost rows are the same:<br />
<br />
# Attempted, I_INVOICE_COST<br />
50,2.4828,6.0253<br />
50,1.4496,6.0253<br />
50,1.4656,6.0253<br />
50,1.4664,6.0253<br />
...
Find more posts tagged with
Comments
There are no comments yet