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)
Average by rows aggregation different from average by total aggregation
dragosss24
Hello. I'm new to BIRT. I have the following problem:
2 columns with 5 row values.
col1----col2
0.03----0
0.75----7.27
27.4----348.05
31.04---332.64
19.43---237.58
1.81----16.7
Total 80.46----942.24
If I divide total col1 by total col2 the result is 0.0853 - the correct result. I don't want to use aggregation of aggregations since data is dynamicaly filled.
The expression I used for AVG is:
dataSetRow["col1"]/dataSetRow["col2"] with filter dataSetRow["col2"] > 0
The result is different from the total average: 0.093 , as it's calculated only for 5 row of 6 ....
Can you please help me with the expression?
Find more posts tagged with
Comments
kclark
The best solution for this is to use sum aggregation for each column then you can use a data element to divide by the two.