Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pipuindia99
Creator III
Creator III

I would like to sum values based on my selections?

I would like to sum values based on my selections?

I would like to add the month values like if i am selecting month March, then it should add from Jan to Mar. can anyone give me some example?

3 Replies
Kushal_Chawda

Assuming that you have Date in your  data

Sum({<Date = {">=$(=monthstart(addmonths(max(Date),-2)))<=$(=max(Date))"}>}Amount)

Update: Addmonths

arulsettu
Master III
Master III

may be like this

Sum({<Date = {">=$(=YearStart(max(Date)))<=$(=max(Date))"}>}Amount)

sunny_talwar

I further suggest using Date() function to make sure there are no formatting difference

Sum({<Date = {">=$(=Date(YearStart(Max(Date)), 'DateFieldFormatHere'))<=$(=Date(Max(Date), 'DateFieldFormatHere'))"}>} Amount)