
1. Re: Percent difference calculation in a line graph view
Michel Caissie May 23, 2014 10:43 AM (in response to Kiran v)Kiran,
have a look in the attachment, specifically the calculated fields
ABD10 diff from Base
BCD20 diff from Base
CBD30 diff from Base
and Label.
On the green Label pill (with the little triangle) make a special attention to the Edit Table Calculation  Compute using Advanced section. Make sure to have the right setting for the three calculated field
Michel

Book3 ed mc.twbx 34.6 KB


2. Re: Percent difference calculation in a line graph view
Kiran v May 23, 2014 2:30 PM (in response to Michel Caissie)Works wonders Michel, thanks a ton. It works
Although I would prefer to know your logic behind applying three different table calculations and then using them as an attribute in different string calc. I kind of get why you used ZN, WINDOWS_SUM and ATTR but can't really see the big picture.
But it works perfectly.
Thanks Michele.
Regards,
K

3. Re: Percent difference calculation in a line graph view
Michel Caissie May 26, 2014 7:54 AM (in response to Kiran v)1 of 1 people found this helpfulKiran,
A good way to start to resolve this type of problem is to first display all the dimensions and measures in discrete mode on the row shelf as i did in the validation sheet.
Then you start precising your questioning.
Here , for every group of Month  Classes, you want to get the ratio from one member of Classes with another member of Classes.
Already here you can figure that you will need some table calculation that will compute for every MonthClasses group and will restart every Month.
Now to get the ratios , you need to classify for each group which Classes is BASE vs ABD10 etc,... this is done with if ATTR(Classes) = 'BASE' etc,...
And you need to apply the Window_Sum on the Price and not only the Sum in order to be able to restart the computation for every Month.
Now if you return to your final Viz, what you have is the Price along an axis and the Month along another axis and one mark for every Classes for every Month. Those marks are connected , which gives you a line chart.
Now what you want to do , is to overlay the result you got in the previous calculations on the marks of your line chart.
This is the goal of the Case in the calculated field [Label]. What it say is ' if the Mark is for the Classes ABD10 then apply the result of the [ABD10 diff from base] on the label of the mark, etc...
Michel

4. Re: Percent difference calculation in a line graph view
Kiran v May 28, 2014 5:50 AM (in response to Michel Caissie)Super helpful breakdown, will help me put future complex table calculations in perspective.
Thanks Michel.