cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Calculating Total Average of last 3 months not including current month without using slicer

I have searched everywhere on this forum and others to look for an answer but I have not been able to figure it out. I want to have a measure that calculates the total average of the last 3 months not including this month. And another measure that calculates the average of last three months on this date. So I can use a card measure to calc = last3MonthAvg / TotalLast3monthAvg and get a %.

Eg. in excel it is very simple:

But I need the '%PerDay' as a measure so I can multiply it by CurrentDates sales. I have managed to do the below in pivot table but have not been able to hold a measure with a single value such as the Avg. All help is appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

## Re: Calculating Total Average of last 3 months not including current month without using slicer

You may take a look at the following posts.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Super User IV

## Re: Calculating Total Average of last 3 months not including current month without using slicer

You can use DATESINPERIOD function, please see the below.

https://docs.microsoft.com/en-us/dax/datesinperiod-function-dax

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.

Frequent Visitor

## Re: Calculating Total Average of last 3 months not including current month without using slicer

Thank you for responding. It did not work. It will not give me a single value.

Super User IV

## Re: Calculating Total Average of last 3 months not including current month without using slicer

@israabuhasna You can use a rolling formula with a date dimension .

Example

``````Rolling 3 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-3,Day))
``````

In case it does not help, please provide additional information and mark me with @
My Recent Blog -Week is not so Weak Proud to be a Super User! Connect on Linkedin

Community Support

## Re: Calculating Total Average of last 3 months not including current month without using slicer

You may take a look at the following posts.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

#### MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

#### ‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors