Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
aggregation on footer
rafavs86
I'm trying to calculate a percentage of the total of a table, I use the following:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>var TY=BirtMath.safeDivide(dataSetRow["dyiSales::RTL_FW_TY"],row["DEPT_QTY_TY"],0);
var LY=BirtMath.safeDivide(dataSetRow["dyiSales::RTL_FW_LY"],row["DEPT_QTY_LY"],0);
(TY-LY/LY)</pre>
<br />
but is not giving the expected result, for some reason these variables are gettign a different value along the calculation, im placing an aggregation field at the footer and I'm using aggregate on Table.<br />
<br />
When I print either TY or LY alone the values make sense, but what confuses me a lot is that if I print:<br />
<br />
(LY/LY)<br />
<br />
It wont't give 1 ! how can this be possible? Again I'm doing this on a footer aggregation.<br />
Is there a work around ?
Find more posts tagged with
Comments
rafavs86
I fixed this by binding pre aggregated field and ended up using a data element with JS expression, couldnt figure out what was wrong with the aggregation