Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to show the percentage of a field with three distinctions.
Company | Division | =sum(sales) | Total Company Sales |
---|---|---|---|
A | A1 | 10 | 55 |
A | A2 | 20 | 55 |
A | A3 | 25 | 55 |
At the moment when I calculate the total using the expression =aggr(sum(Sales),Company) , I am only getting the total company sales for one division.
How can I get it for all?? So I can then work out the percentage sales as a total?
You should not use Aggr() for this. You should use the total qualifier:
The total sales, entire selection: Sum( total sales )
The total sales, within company: Sum( total <Company> sales )
So your percentage should be calculated through
Sum( sales ) / Sum( total <Company> sales )
HIC
hi
try this
aggr(sum(Total Sales),Company)
You should not use Aggr() for this. You should use the total qualifier:
The total sales, entire selection: Sum( total sales )
The total sales, within company: Sum( total <Company> sales )
So your percentage should be calculated through
Sum( sales ) / Sum( total <Company> sales )
HIC
hi
try this
sum(Sales)/SUM(TOTAL {1} Sales)
Great Thanks, Working now
See also The Aggregation Scope and When should the Aggr() function NOT be used?
HIC