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)
Inputs on Grouping and aggregation
RepBIRT
Need few information to do some calculation based on the grouped values.
There are two columns A & B in the database. The column B contains the value of 0 or 1
The report should contains five columns.
1) First column is the grouped value of A.
2) Second column is the aggregated count of B.
3) Third column is the count of B where the values are zero.
4) Fourth column is the count of B where the values are zero.
5) Fifth column should (sum of zero) / aggregated count of B.
Example:
Database:
A B
a 0
a 1
a 0
Report:
Name Total Zero?s One?s Cal
a 3 2 1 0.6 (2/3)
How do to the calculation for the fifth column (Cal).
The second, third and fourth column value are calculated using aggregation.
Any idea or reference would be of great help.
Find more posts tagged with
Comments
Tubal
If I understand correctly, your 5th column is (3rd column)/(2nd column).<br />
<br />
Since you've already got a data bindings created for your 2nd and 3rd columns when you created your aggregates, it should simply be a matter of creating one additional data binding with that calculation.<br />
<br />
For example:<br />
<br />
Create a new data element in the 5th column.<br />
That data element would be something along the lines of:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>row["myColumn3aggregate"]/row["myColumn2aggregate"]</pre>
<br />
Changing the names of the rows to whatever you named your aggregates, obviously.