I am using SQL Server. The Formula I need to use is (Good-Bad)/Total_Responses. A Good is when the value is >=9 and a Bad is <=6.
The Data I have is:
DATE Q1 Q2
2012-03-04 9 9
2012-03-04 8 8
2012-03-04 7 9
2012-03-04 4 NA
2012-03-04 10 10
2012-03-04 8 3
2012-03-04 3 4
2012-03-04 2 6
2012-03-04 6 8
2012-03-04 NA 6
I know I am going to have to use a "CASE WHEN ISNUMERIC(Q1)=1" to make sure it does not use the NA values (They are stored as Nvarchar)
So the formula would end up being (5-8)/18=-0.16666 So overall I am trying to get the data to look like:
DATE Promotor_Score
2012-03-04 -0.16666
Thank You!