Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help For Sum Function (Set Analyses)

     On the filter screen, when 2017 and 2018 is selected, I can see all available months for selection. However, while doing the calculations, I want to use the months of 2018 only. For instance, when I execute this code, the biggest year 2018 can be selected as well as the biggest month the 12th can be selected whereas there is no 12th month available for 2018 in my dataset, due to this it doesn't work properly. What I want is, when I select a year, months should be filtered out based on the selected month and calculations should be done accordingly.

Sum({$<Year={"$(=(Max(Year)))"}, Month={"$(=(Max(Month)))"}>} Envanter)

I tried this but doesnt work

Sum({$<Year={"$(=(Max(Year)))"}> * $<Month={"$(=(Max(Month)))"}>} Envanter)

Picture.png

4 Replies
tresesco
MVP
MVP

Ideally, in this scenario you should use date field instead, like:

Sum({$<Year, Month, Date={">=$(=MonthStart(Max(Date))) <=$(=MonthEnd(Max(Date)))"}>} Envanter)

sunny_talwar

Try this

Sum({$<Year = {"$(=Max(Year))"}, Month = {"$(=Max({<Year = {'$(=Max(Year))'}>}Month))"}>} Envanter)

Anonymous
Not applicable
Author

Thank You so much , its work

sunny_talwar

Great, we are glad that we were able to help