Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi new here so apologies if others have answered this one -
sum(
{<YearMonth,YearMonth={'>= $(vYearMonth2PrevToData) <= $(vYearMonthToData) '}>}
Amount)
The variable names aren't great but they are to drive the date back to when the data corresponds and they seem to be working fine in terms of matching the right date - however this sum results in 0 despite everything showing correct
OK - SUM({YearMonth,YearMonth={'>=20151 <=20153'}>}Amount)
If I just use one or the other variable it provides the answer so it has to have something to do with me trying to define the range to do the sum over.
Any help appreciated - even the learning I am doing suggests I have everything correct
Can you try this
Sum({<YearMonth = {"$(='>=' & vYearMonth2PrevToData & '<=' & vYearMonthToData)"}>} Amount)
or
Sum({<YearMonth = {"$(='>=' & $(vYearMonth2PrevToData) & '<=' & $(vYearMonthToData))"}>} Amount)
Can you try this
Sum({<YearMonth = {"$(='>=' & vYearMonth2PrevToData & '<=' & vYearMonthToData)"}>} Amount)
or
Sum({<YearMonth = {"$(='>=' & $(vYearMonth2PrevToData) & '<=' & $(vYearMonthToData))"}>} Amount)
Thank you so much Sunny for the quick reply - both seem to be working fine.
Any reason why I had to define them as strings or in-case I have used the wrong terminology '>='
You can try this also
Sum({<YearMonth = {">=$(=vYearMonth2PrevToData)<=$(=vYearMonthToData)"}>} Amount)
or
Sum({<YearMonth = {">=$(=$(vYearMonth2PrevToData))<=$(=$(vYearMonthToData))"}>} Amount)