G
Guest
I am having a problem with a running total. I have the following statement in
a query named [Matrix Pattern].
SELECT [Matrix Data].Day AS [Day], [Leads]/(SELECT SUM(Leads) FROM [Matrix
Data]) AS Percentage, (SELECT SUM(Percentage) FROM [Matrix Pattern] AS X
WHERE X.Day <= [Day]) AS PTotal
FROM [Matrix Data];
This statement gives me 100% for every record when I need it to return the
following
Day Percentage PTotal
1 .1 0.1
2 .5 0.6
3 .4 1.0
What am I doing wrong?
a query named [Matrix Pattern].
SELECT [Matrix Data].Day AS [Day], [Leads]/(SELECT SUM(Leads) FROM [Matrix
Data]) AS Percentage, (SELECT SUM(Percentage) FROM [Matrix Pattern] AS X
WHERE X.Day <= [Day]) AS PTotal
FROM [Matrix Data];
This statement gives me 100% for every record when I need it to return the
following
Day Percentage PTotal
1 .1 0.1
2 .5 0.6
3 .4 1.0
What am I doing wrong?