Gasman
Enthusiastic Amateur
- Local time
- Today, 08:16
- Joined
- Sep 21, 2011
- Messages
- 16,281
Hi all,
I have just created this crosstab query to see my daily intake for my diabetes monitoring.
How would I get a total column at the end that sums each of the values per day?
Crosstabs have never been my thing :-( When I try to respond to one error message, it generates another that appears to contracdict the first, well to me at least. :-(
I would really like to have it at the far right.
I have managed to get a total, but always as the second column.
TIA
I have just created this crosstab query to see my daily intake for my diabetes monitoring.
How would I get a total column at the end that sums each of the values per day?
Crosstabs have never been my thing :-( When I try to respond to one error message, it generates another that appears to contracdict the first, well to me at least. :-(
I would really like to have it at the far right.
I have managed to get a total, but always as the second column.
TIA
Code:
TRANSFORM Format(Sum(tblDaily.CarbsCalc),"Fixed") AS SumOfCarbsCalc
SELECT tblDaily.DailyDate
FROM tblDaily INNER JOIN tblLookUp ON tblDaily.MealTypeFK = tblLookUp.LookUpID
GROUP BY tblDaily.DailyDate
PIVOT tblLookUp.LookUpValue;