Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a pivot table that has two columns at the moment. Column A has the names of companies and column B shows how many hours they have worked: e.g.
A | B |
---|---|
Bruce Ltd | 200 |
Dave Corp | 600 |
Peterson LLC | 200 |
The values in B are calculated via a variable, v_company_hours,
What I am looking to do is have a third column which will show the percentage each company works compared to the total of the column. e.g.
Header 1 | Header 2 | Header 3 |
---|---|---|
Bruce Ltd | 200 | 20% |
Dave Corp | 600 | 60% |
Peterson LLC | 200 | 20% |
I know this is probably quite easy and somehow uses aggr but it has escaped me. Any help would be greatly appreciated.
If this is in a straight table you can select the relative option on the expressions tab. Else, if you want to use an expression... you can use this
Assuming you expression is this
Sum(B).... try this
Sum(B)/Sum(TOTAL B)
If this is in a straight table you can select the relative option on the expressions tab. Else, if you want to use an expression... you can use this
Assuming you expression is this
Sum(B).... try this
Sum(B)/Sum(TOTAL B)
It seems that the relative option is my new friend! Thanks for this.