cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
israabuhasna
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!Excel2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

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

@israabuhasna 

 

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.

View solution in original post

4 REPLIES 4
Super User IV
Super User IV

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

Hi @israabuhasna 

 

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

 

israabuhasna
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
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))  

 





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
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
Community Support

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

@israabuhasna 

 

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.

View solution in original post

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

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

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘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