Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with aggr Function

I was trying to use aggr function to show the totals on a straight table but having issues with it and unable to understand what is missing. Hope someone could help on this please. You can find the below table to show what is done exactly

DimExpression(1)=Sum({<Set analysis criteria>}field ABC)Experssion(2)=Sum({<Set analysis criteria>}Field xyz)Expression(2)/expression(1)
256$448-
STO7$255$36
Kid10$0$0
RAP10$0$0
Res10$25$3
Exi15$0$0
Pan15$35$2
06-16$0$0
Doc17$0$0
Eva18$0$0
Hon18$0$0
DET20$0$0
Hi 20$34$2
Pul20$0$0
Rav20$99$5
Rev20$0$0
SAI20$0$0

the expression i am tryin to use for the right most column is

=Sum(aggr(Sum({<Set analysis criteria>}field ABC)/Sum({<Set analysis criteria>}Field xyz),dim))

not only this i have tried to use the total in the expression and even removing the aggr and just use total is not working.

The problem is that i need values to show expression up by each dimensional value and the total on the top and the in the properties-->expression--> when i check the option expression total its not showing up.

Thanks in advance.

1 Reply
wms_manis
Partner - Contributor III
Partner - Contributor III

Not real sure what you are trying to do, but if you want a total based on a set expression you can use the total qualifier.

sum({$<p1={'R*'}>}total value)  //sum up all the p1 values that start with R.  This returns 60.

you can do the division but basically you can calculate a total value for a set condition and divide it by another value.

See attachment.

p1 sum(value) sum({$<p1={'R*'}>}total value) aggr(sum({1<p1={'R*'}>}value),p1) sum({$<p1={'D*'}>}Total value)
256 60 37
06-166037
DET206037
Doc176037
Eva186037
Exi156037
Hi206037
Hon186037
Kid106037
Pan156037
Pul206037
RAP10601037
Rav20602037
Res10601037
Rev20602037
SAI206037
STO76037