Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to calculate some rate against a total from a single value of one dimension,
but I don't find an appropriate expression;
for exemple:
in a pivot table there are any rows for dimensions:
year tipology sum %
2013 sales 10000
2013 rmcost 7000 rmcost/sales
2013 pcost 2000 pcost/sales
2013 margin 1000 margin/sales
how can i calculate the percentage in expression table?
i need sum of tipology = 'sales'
thanks
Leonello
Hi Leonello
You can play with the expression a little bit
try the following:
sum({$<tipology>}sales) / sum(TOTAL sales)
Is this what you need?
with these data (if I understand)
test:
load * inline [
year , tipology , val , %
2013 , rmcost , 7000 , rmcost/sales
2013 , pcost , 2000 , pcost/sales
2013 , margin , 1000 , margin/sales
];