Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggr function

Hi all,

I'm trying to calculate de % of transfers by status per market and mill.

In order to do that, i've drawn a pivot table and, so far, i've only been able to aggregate my function per market... Can you help doing it also by mill? (The sum per mill and market has to be 100%)

My current expression is this one:

=count(AllocTransfAllocTransfId) /aggr(NODISTINCT count(AllocTransfAllocTransfId),AllocTransfOrigMktDescrip)

Thanks!

1 Solution

Accepted Solutions
brunobertels
Master
Master

Hi

Try to add Mill as second dimension to group by in your agrr function


=count(AllocTransfAllocTransfId) /aggr(NODISTINCT count(AllocTransfAllocTransfId),AllocTransfOrigMktDescrip,mill)

View solution in original post

4 Replies
OmarBenSalem

u wanto to have % of APPROV CANCED AND REJECT based on ATF for example?

I mean ATF represents 100% in this case?

Capture.PNG

Try; sum(YourMeasure) / sum( total <YourDimension> YourMeasure)

while YourDimension is the one that contains ATF, FIG, SET etc

brunobertels
Master
Master

Hi

Try to add Mill as second dimension to group by in your agrr function


=count(AllocTransfAllocTransfId) /aggr(NODISTINCT count(AllocTransfAllocTransfId),AllocTransfOrigMktDescrip,mill)

Anonymous
Not applicable
Author

Thank you Bruno Bertels. It's working! I thought I could only use aggr function for 2 fields/dimensions.

brunobertels
Master
Master

Hi

i'am glad it works

remember that in your pivot table, if you add dimension then your aggr function should be updated with this new dimension

Bruno