Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Re: Total sales last 12 months

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

Re: Total sales last 12 months

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

Not applicable

Re: Total sales last 12 months

muchas gracias si me funciono