Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
New Contributor III

Averages by Month


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...


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


Tags (1)
1 Reply

Re: Averages by Month

May be this

Sum(TotalDeals)/Count(DISTINCT Month)