# DAX power pivot Average

1. ## DAX power pivot Average

I'd like to calculate the average for the total of sales for each month, per sale date not the total number of days per moth.

So in excel it would be
``Please Login or Register  to view this content.``
summed units / count of sales dates.

I've used

``Please Login or Register  to view this content.``
To give me the total sales for each month but can't sum the number of dates for each month. I have tried various
AVERAGE, AVERAGEX option, but cant get the correct granularity,

I've attached a workbook with attempts and excel table with what I'd like to achieve.

Richard

2. ## Re: DAX power pivot Average

In the attached both these approaches produce the same averages.

 I J K L 3 4 1/1/20 6.875 5 2/1/20 5.285714 6 3/1/20 4.6 7 8 # of days # units average? 9 1/1/20 8 55 6.875 10 2/1/20 7 37 5.285714 11 3/1/20 10 46 4.6

With the first day of each month in Table1 listed in column I this in cell J4 and filled down.
Formula:
`Please Login or Register  to view this content.`

The other approach (more resembling the one in your upload) again with first day of the month in column I this in J9 and filled down to get the counts.
Formula:
`Please Login or Register  to view this content.`
Then to sum units this in K9 and copied down.
Formula:
`Please Login or Register  to view this content.`
Then for the monthly averages this in L9 and copied down.
Formula:
`Please Login or Register  to view this content.`

Does this do what you want?

Thank you

RD

4. ## Re: DAX power pivot Average

You are welcome.

Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

5. ## Re: DAX power pivot Average

Sorry forgot.

RD

6. ## Re: DAX power pivot Average

No problem.

There are currently 1 users browsing this thread. (0 members and 1 guests)