Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total sales last 12 months

Good Morning

I need help,

I am applying a set of analysis where I show the total sum of the last 12 months, so far if I apply the sum of the last 12 months that are from December 2017 to January 2017, but I want to show me when selecting November - 2017 that me of the sum of the accumulated to November-2016 or October -2017 to October -2016

This is my formula:

NUM (sum ({$ Year = {$ (= Max (Year) -1)}, MonthDayC1 = {"<= $ (Max (addmonths (MonthDayC1,13)))}}, Month =>} Value) / 1000000, '$ #, ## 0')

Please help, I do not know how to do it

Thank you

1 Solution

Accepted Solutions
sunny_talwar

Try something like this

Sum({$<DateField = {"$(='>=' & Date(AddMonths(Max(DateField), -12), 'DateFieldFormatHere') & '<=' & Date(Max(DateField), 'DateFieldFormatHere'))"}, Year, MonthDayC1, Month =>} Value)

View solution in original post

2 Replies
sunny_talwar

Try something like this

Sum({$<DateField = {"$(='>=' & Date(AddMonths(Max(DateField), -12), 'DateFieldFormatHere') & '<=' & Date(Max(DateField), 'DateFieldFormatHere'))"}, Year, MonthDayC1, Month =>} Value)

Not applicable
Author

muchas gracias si me funciono