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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
reporting_neu
Creator III
Creator III

AVG of the last 12 months

Hello,

I always need the AVG for the last 12 months.

It must not be taken into account which year is currently selected. How do I do that?

 

Avg({<Art = {'R'}> }date(IncomingPayments,'DD.MM.YYYY')-(date(DateOfInvoice,'DD.MM.YYYY')+2))

 

 

1 Solution

Accepted Solutions
reporting_neu
Creator III
Creator III
Author

Many thanks for your response. I just found a solution.

Avg({IncommingPayments = {">=$(=AddMonths(today(),-12))"}, <Art = {'R'}> }date(IncomingPayments,'DD.MM.YYYY')-(date(DateOfInvoice,'DD.MM.YYYY')+2))

{">=$(=AddMonths(today(),-1))"}

View solution in original post

3 Replies
Joseph_Musekura
Support
Support

Hi,

This link shows a calculation of the sum over 12 months in Qlikview.
It can inspire you how to do it in Qlik sense and then calculate the AVG as well

https://community.qlik.com/t5/QlikView-App-Dev/Sum-the-last-twelve-months/td-p/437490
Regards

reporting_neu
Creator III
Creator III
Author

Many thanks for your response. I just found a solution.

Avg({IncommingPayments = {">=$(=AddMonths(today(),-12))"}, <Art = {'R'}> }date(IncomingPayments,'DD.MM.YYYY')-(date(DateOfInvoice,'DD.MM.YYYY')+2))

{">=$(=AddMonths(today(),-1))"}

Joseph_Musekura
Support
Support

Thanks as well!
/joseph