Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Averages by Month

Hello,

I have a question - i have a request from management to do a average by month for a running total of sale Deals.

In the view, we had rounded each rep to deal total by month, so the month always returns the first of the month so we can run totals by month.

So for example the table looks like this:

Sales RepTotalDealsMonth
John Doe1409/1/2017
Steve Joe1009/1/2017
John Doe508/01/2017
Steve Joe808/01/2017

I have sale deals coming in as a sum in a pivot as measures, the exec wants a running average... so if he chooses 5 months, he wants it to do an average by 5 months...

Sum(TotalDeals)/MONTHS CHOSEN

How would i return the selected months he is using, the date is a column and the measures are above.

Thanks

1 Reply
sunny_talwar

May be this

Sum(TotalDeals)/Count(DISTINCT Month)