Would be grateful if someone can debug this expression as it is giving nil return,
sum(
SELECT(
(Miles[Miles Completed]),
AND(
[DATE] <= [_THISROW].[DATE],
MONTH([Date])=MONTH [_THISROW].[DATE]
)
)
)
I am trying to show the cumulative miles completed in each month up to and including the day entry for each record.
I get the result for current month by substituting
MONTH([Date])=MONTH [_THISROW].[DATE]
with
MONTH([Date])=MONTH(TODAY())
but this naturally only gives the correct result for the current month.
Many Thanks.