Skip to main content
Inspiring
December 29, 2008
Answered

Calculate when With 15% of Target

  • December 29, 2008
  • 1 reply
  • 533 views
How would I calculate when my actual value is within 15% of my target?
e.g lets say my my actual is 65 and 15% of my target is 75 then this is within the mark. but if my actual is 90 and 15% of target is 75, this will fall out of the 15% Target.

I am only interested in the Actual values that is with 15% of the Target. Any values out side the 15% Target value range is not considered.

Thanks
This topic has been closed for replies.
Correct answer Dan_Bracuk
select somefields
from sometables
where yourvalue between target * .85 and target * 1.15

1 reply

Dan_BracukCorrect answer
Inspiring
December 29, 2008
select somefields
from sometables
where yourvalue between target * .85 and target * 1.15
eziokoloAuthor
Inspiring
December 29, 2008
I don't know if the where clause will be helpfull here, because I need to retrieve this in a select statement with other columns of the database table. See example of stored procedure (MS SQL Server)