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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
PRS
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

Labels (1)
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.