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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors