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

troubles with a double aggr function

dear all,

I'm having some trouble with my aggr.

I'm trying to get per line its share in the CategorieSubgroep.... For some reason 1 line per subcategorie is working bu the others are not showing. They are based on the subtotal of the subcategorie.

Aandeel2 should be filled for all lines. --> shown answers are correct sofar, now for al.

appreciate the help!!

regards

Aggr issue.JPG

Sum({$<
table_code={2},
Revenue={'MAT'}
>}
afzet)
/
Sum(
aggr(sum(
{$<
table_code={2},
Revenue={'MAT'}
>}
afzet), CategorieSubGroep_Subgroep_omschrijving))

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this:

Sum({$< table_code={2}, Revenue={'MAT'} >}afzet) / 

Sum({$< table_code={2}, Revenue={'MAT'} >} TOTAL <CategorieSubGroep_Subgroep_omschrijving> afzet)


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Try this:

Sum({$< table_code={2}, Revenue={'MAT'} >}afzet) / 

Sum({$< table_code={2}, Revenue={'MAT'} >} TOTAL <CategorieSubGroep_Subgroep_omschrijving> afzet)


talk is cheap, supply exceeds demand
Not applicable
Author

Gysbert,

thanks for the answer! it works, however can you also explain it to me. I was unfamiliar with the fact that you can use <> after Total, what does this o?

you can explain in Dutch if it would be easier.

Thanks!

Gysbert_Wassenaar

From the help file:

If the word total occurs before an expression, the calculation will be made over all possible values given the current selections, but disregarding the chart dimensions.

The total qualifier may be followed by a list of one or more field names within angle brackets. These field names should be a subset of the chart dimensions. In this case the calculation will be made disregarding all chart dimensions except those listed, i.e. one value will be returned for each combination of field values in the listed dimension fields.


talk is cheap, supply exceeds demand