I am trying to create a crosstab query that is the average score for each Line of Business. I thought that this would be simple. But I am running into problems.
Here is what I would like it to look like. The number must be between 0 and 2 with two decimal places.
LOB1 LOB2 LOB3 LOB4
Review 1.12 1.20 1.29 1.8
Data:
LOB1 1.12
LOB1 1.12
LOB2 .08
LOB2 2
LOB2 1.52
LOB3 1.1
LOB3 1.34
LOB3 1.44
LOB4 2
LOB4 1.6
TRANSFORM Avg(DataPlanScorecardReviewAll.InitialScore) AS AvgOfInitialScore
SELECT DataPlanScorecardReviewAll.ACTIVITY_TYPE, Avg(DataPlanScorecardReviewAll.InitialScore) AS [Total Of InitialScore]
FROM DataPlanScorecardReviewAll
GROUP BY DataPlanScorecardReviewAll.ACTIVITY_TYPE
PIVOT DataPlanScorecardReviewAll.Name;
I get an error that “Invalid precision for decimal data” any ideas?
Thanks,
Darkhat01
Here is what I would like it to look like. The number must be between 0 and 2 with two decimal places.
LOB1 LOB2 LOB3 LOB4
Review 1.12 1.20 1.29 1.8
Data:
LOB1 1.12
LOB1 1.12
LOB2 .08
LOB2 2
LOB2 1.52
LOB3 1.1
LOB3 1.34
LOB3 1.44
LOB4 2
LOB4 1.6
TRANSFORM Avg(DataPlanScorecardReviewAll.InitialScore) AS AvgOfInitialScore
SELECT DataPlanScorecardReviewAll.ACTIVITY_TYPE, Avg(DataPlanScorecardReviewAll.InitialScore) AS [Total Of InitialScore]
FROM DataPlanScorecardReviewAll
GROUP BY DataPlanScorecardReviewAll.ACTIVITY_TYPE
PIVOT DataPlanScorecardReviewAll.Name;
I get an error that “Invalid precision for decimal data” any ideas?
Thanks,
Darkhat01