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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Zara
Contributor III
Contributor III

Future Dates

Afternoon all,

Have a report where the user will go in and select any year month and i want to do a count of any sales from that month and the subsequent 3 months only from that date. 

I've tried to replicate in the picture below

So if the user selected - 

Jan 2020 - I would expect the sum to be  166

Feb 2020 - i would expect the sum to be 191

March 2020 - i would expect the sum to be 172

Anyone have any ideas what i would need to put within my set analysis to be able to achieve this please.

Zara_0-1617207169055.png

Thank you in advance, i love the monthsago field, i suppose i'm looking for the opposite.

Thanks

1 Reply
Anil_Babu_Samineni

Perhaps this?

Sum(Aggr(If(GetselectedCount(SalesYearMonth)>1, Sum({<SalesYearMonth={">=$(=Max()SalesYearMonth)<=$(=AddMonths(Max(SalesYearMonth),3))"}>}SumSales), Sum(SumSales)), SalesYearMonth))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful