Showing results for 
Search instead for 
Did you mean: 
New Member

Help with Var function filtering by from most recent date of data point

I am trying to filter data points based on their average value for the past 28 days. Right now the function I have is taking the first date in my date range and filtering the 28-day average from that point. Where I want my function to filter the 28-day average working back from the date of my most recent data point in the data range, rather than the oldest data point in my date range. You can see in the picture attached the yellow line under jump height labeled 13.58 is taking the average from the oldest two data points in the date range (13.5,13.66) on the line graph rather than the most recent data point of 12.95. Which in this case since there is only one data point in the past 28 days the yellow line under the jump height gague should be represented by 12.95 if the function was working the way I wanted it to.Rolling Average Powerbi Question.PNGRolling Average Question 2.PNG

Community Support
Community Support

Hi, @brendanoshea 


Can you provide sample data for testing? Sensitive information can be removed in advance.

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

rolling average.PNG

I am just trying to make a 28 day rolling average, this is my DAX code but for some reason I get a blank return when I run it. I know there are data points in the data range I am giving it but it keeps giving me a blank no matter what function I use.

Helpful resources

Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors