Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kayde_72
Contributor III
Contributor III

Set Analysis- Sum based on different month values

I want to sum up the amount of four different fields. Three of them I need based on the current month. The last one I need based on next month's summation of the field [PD.Statement Line Amount]. Below is what I currently have but I am not sure if it works. There will not be a "max month" in my data since I am trying to find this within historical data. The result I am looking for is in the picture. It will be broken down by the year, month, and then the different amounts. The results  Any help would be appreciated! Dont worry about the overall formula, it works fine, just trying to figure out the last bit in bold.

(((Sum([OS.Payment Amount])+     Sum([IS.Payment Amount]))-    Sum([VD.Payment Amount])

- Sum({$<[CanonicalDate.autoCalendar.Month] = {$(=Max([CanonicalDate.autoCalendar.Month]) + 1)}>}
[PD.Statement Line Amount]))

CadeTrav_0-1647967203857.png

 

Labels (2)
0 Replies