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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Sum many values at specific date

I have a many values and manydates. When the user selection a date, in the table must be have 3 columns:

Sum atmonth  selection , sum at month selection-1( previous ), sum at month selection -2 ( previous-previous ).

Who canhelp me =/

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I'd recommend adding a new field in your Calendar and to assign a numeric representation for the month number. For example:

MonthNumber = Year*12 + Month.

This way, MonthNumber-1 will always represent the previous month and MonthNumber - 2 will always represent the month before previous.

With this field, your 3 expressions would look like this:

sum({$<MonthNumber = {$(=only(MonthNumber))}>} Value)

sum({$<MonthNumber = {$(=only(MonthNumber)-1)}>} Value)

sum({$<MonthNumber = {$(=only(MonthNumber)-2)}>} Value)

regards,

Oleg Troyansky

Ask me about Qlik Sense Expert Class!
Not applicable
Author

I wasn’t really clean in my question, this is the point:

Sum many values the months until the month selected. Example:

Sum at month  selected , sum until month selection -1( previous ), sum until month selection -2 ( previous-previous ).