Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm comparing net sales of a salesman to total net sales and the result is fine
However now we are reducing the document by salesman so total net sales will be that of the salesman
How can I reduce a document by salesman and keep total sales?
reducing using section access you mean?
You need to preaggreate in the script so the total overall is always there and each salesman can see it, but they cannot see the details. Usually a LOAD ... GROUP BY ... will work.
Create an additional column with total sale. May be like:
Temp:
Load
State,
Sales,
Customer
From <>;
Join
Load
State,
Sum(Sales) as TotalSales
Resident Temp group By State;
yes
I thought of this but at first I thought there might be another workaround
There is none, data must be there and cannot be reduced or accomplished using Aggr() or Set Analysis because data is not actually there.
Well, you can also add another column while extracting from the source but that likely means repeated values, and you can also do the aggregation in the SQL statement, and not the LOAD statement, from the performance point of view the latter is wiser.