Formula for calculating miles completed in month to current entry date

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.

Solved Solved
0 2 157
1 ACCEPTED SOLUTION

Maybe you wish to try instead

MONTH([Date])=MONTH ([_THISROW].[DATE])

View solution in original post

2 REPLIES 2

Maybe you wish to try instead

MONTH([Date])=MONTH ([_THISROW].[DATE])

Perfect. Many thanks for your quick response.

Top Labels in this Space