4 Replies Latest reply on Oct 8, 2018 12:07 PM by Mahfooj Khan

# calculated field to find difference

I need help please In the below sample view, I need to calculate my before and after average value.  I have a field called stage and value is Before or After. I need to calculate the difference and % difference but I am stumped and don't know how. In the example below for Employee J, Before Avg = 1.545 and After Avg = 2.281. Therefore, the difference would be 0.736 and the % diff would be 38%. How do I do this? I attached my sample workbook. Thank you so much! • ###### 2. Re: calculated field to find difference

Hi,

You have to little bit modify your before and after formula, find my approach below

[Before Formula Value - New]

{INCLUDE [Employee Name]:AVG(if [Stage]='BEFORE' then [Formula]

end)}

[After Formula Value - New]

{INCLUDE [Employee Name]:AVG(if [Stage]='AFTER' then [Formula]

end)}

[Diff]:

SUM([After Formula Value - New])-SUM([Before Formula Value - New])

[% Diff]:

[Diff] / SUM([After Formula Value - New])

Let us know if this help.

Mahfooj

2 of 2 people found this helpful
• ###### 3. Re: calculated field to find difference

Thank you, Mahfooj! Your formula worked

• ###### 4. Re: calculated field to find difference

Glad I could help kindly mark my reply as correct so that, this thread gets closed and others can take benefits who have similar query.