This content has been marked as final.
Show 3 replies

1. Re: Table Calculations
David Li Oct 7, 2016 10:38 AM (in response to Lavanya Doddi)Hi Lavanya, here's what I would do:
 Create a table calculation for % of total sales. Set it to compute along Pre/Post (so that it only applies within each Category). Let's call this field [% Sales].
SUM([Sales])/TOTAL(SUM([Sales]))
 Create a calculated field that gets the Impr. field and add it to the view.
[% Sales] * 2  1
 Hide all but the highest value for Impr. per Category somehow. There are quite a few ways to do this, so let me know if you need more specifics. For instance, you could do a WINDOW_MAX() along [Pre/Post].
 Create a table calculation for % of total sales. Set it to compute along Pre/Post (so that it only applies within each Category). Let's call this field [% Sales].

2. Re: Table Calculations
Lavanya Doddi Oct 8, 2016 1:55 AM (in response to David Li)Thanks for the response, David.
Is there an easy way to write the formula for Impr. field. Its a very simple formula: [Post  Pre].
In the example above, for Cat1, 83.3%  16.7% = 66.7%

3. Re: Table Calculations
David Li Oct 10, 2016 6:53 AM (in response to Lavanya Doddi)The second formula is the Impr. formula.
[% Sales] * 2  1
If you look at the table you have above, you see that the expanded formula for Impr. is
%Sales  (1  %Sales)
This simplifies to
% Sales * 2  1
For example:
83.3%  16.7%
83.3%  (1  83.3%)
2 * 83.3%  1