# App Development

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for
Did you mean:
Contributor

## sum of sales on the max available date of each month

I am trying to find out the sum of sales on the max available date of each month.

i am using the below set analysis:

SUM({<[Date]= {"=Aggr(max([Date]),[Month])"}>}[Sales])

the above expression returns the sum of sales on the first day of each month

even though Aggr(max([Date]),[Month]) returns the correct max available date of each month.

Labels (1)
• ### Set anaysis

15 Replies
MVP

Sum({<[Date] = {"=[Date] = Aggr(NODISTINCT Max([Date]), [Month])"}>} [Sales])

or this

Sum({<[Date] = {"=[Date] = Aggr(Max(TOTAL <[Month]> [Date]), [Month], [Date])"}>} [Sales])
Contributor
Author
@sunny_talwar
The first expression worked.
Thank you so much for the help.
Really appreciated!!
Contributor
Author
@sunny_talwar
Could you please explain this logic?
It will help alot if we face similar situation
MVP

Can you be specific as to what you do not understand about the expression? I will be able to explain better if I know what you need help with.

Contributor
Author
Why are we using "=Date=" again within the quotes?
MVP