Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sekharQV
Creator
Creator

Display Last 13 months sales

Hi Techies,

I want to display last 13 months sales on bar chart based on the month that i selected.

Can i get any suggestions regarding this?

Help is appreciated

Thanks,

Raja

4 Replies
stabben23
Partner - Master
Partner - Master

Hi,

maybe something like Sum({<Year=, Month=, MonthYear=, Date= {">=$(=(AddMonths(MonthYear,-13))) <=$(=(AddMonths(MonthYear,0)))"}>}  Sales) in your expression.

effinty2112
Master
Master

Hi Raja,

Maybe:

=Sum({$<Month=, Year=, Date = {">=$(=Monthstart(AddMonths(Max(Date),-13)))<=$(=max(Date))"}>}Amount)

Cheers

Andrew

saimahasan
Partner - Creator III
Partner - Creator III

Hi

Try this,

It worked.

=Sum({$<order_date=, order_date_day=, order_date_month=, order_date_year=,

order_date_yearmonth = {">=$(=(AddMonths(Max(order_date_yearmonth),-12)))<=$(=(Max(order_date_yearmonth)))"}>}[Total Amount])

saimahasan
Partner - Creator III
Partner - Creator III

Hi Raja,

If you have got the correct answer then please mark the answer as "Correct answer" and close this discussion.