I am using SQL Server. The formula I need to use is (Good-Bad) / Total_Responses. Good is when value = = 9, and Bad is <= 6.
The data that I have:
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 that I will need to use "CASE WHEN ISNUMERIC (Q1) = 1" to make sure it does not use NA values (they are stored as Nvarchar)
Thus, the formula will end up being (5-8) / 18-0-06666 so I try to make the data look like this:
DATE Promotor_Score
2012-03-04 -0.16666
Thank!
source
share