Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
brendanoshea
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

2 REPLIES 2
v-zhangti
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

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Top Solution Authors