Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 Rep | TotalDeals | Month |
---|---|---|
John Doe | 14 | 09/1/2017 |
Steve Joe | 10 | 09/1/2017 |
John Doe | 5 | 08/01/2017 |
Steve Joe | 8 | 08/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
May be this
Sum(TotalDeals)/Count(DISTINCT Month)