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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average

Does anyone know how i would go about finding the average sales for a period of three months prior to today's date?

Any help would be greatly appreciated. Thank you

3 Replies
Not applicable
Author

Hi Brian,

please see the attached example (Set Analysis Tab).

Good luck!

Rainer

eliran
Creator III
Creator III

Hi,

The best way would be using set analysis or if statement, you can use the addMonths function to "add" -3 months prior to the date field this getting the desired outcome.

sum(if(IVDATE>=$(=addMonths(MonthEnd(max(IVDATE)),-3)) and IVDATE<= $(=Today()),sales,0)

Not verified code but that's the idea..

Not applicable
Author

Thanks for the reply, i was hoping it wouldn't have to come to set analysis 😞