This content has been marked as final. Show 5 replies
I'm struggling with a pivot table with relative frequencies, and I'm stuck.
My goals is to achieve a simple pivot table that has:
columns: type of sales
measure: percentage of sales for each type of sales.
Here the data:
Here the result without the percentage but with the simple sum of sales.
So I decided to have the percentage:
the result should be this: the sum of type a is 46 =25+9+12, and for the type b is 44=10+8+21+5.
1 25/46 10/44
2 9/46 8/44
3 12/46 21/44
4 - 5/44
So I've thought to use the aggr() function in this way:
The results are correct, but only if you click one of the workerid, if you do not click one, the result misses some data:
How could I manage to have all the rows filled?
Thanks in advance, attached the app.