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: 
rolandg1881
Creator
Creator

3 Months average in Bar Line Chart

Hi!

I have the following formular to see claims in a Line:

 

{< RMA_ClaimType = {'accepted claim'}, Customer_Number = {'70407'}, [Product] = {'L1'},[RMA_Typ]={'claim'},[Stock]-={'RMA Stock'} >}
DISTINCT[InvoicePos_RMA_Ammount]),RMA_Id))

and the Dimension monthyear, so i can see for example the course from Jan19 to Dec19

what i need is to to see a average line of the last three monts based on the formula

is this possible?

Thanks for help!!!

Greetings

 

Labels (1)
1 Reply
rubenmarin

Hi, one possible solution is to create an as-of calendar so each month can access data of other months https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130

Using this the expression for each month could be: Sum({$<MonthDiff={"<3"}>} Sales)/3

Another possible solution could be creating a new table(fields in data model to store the accumulated value of the last 3 months for customer/product... this could take more work.