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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Beefcake
New Member

Filtering an AverageX function to calculate before a specific date

Hi, 

 

I am trying to create a measure that only calculates the sum before a specific date using the averageX function, could anyone advise me how I would specify this in the KEEPFILTERS part of the expression? I have been trying to simply put "<Date(2015,10,06)" after the (Master[Date]) and a few other things but nothing is working currently 

 

This is the function I currently have 

 
Order_Demand average per Date =

VAR VALUEZ = AVERAGEX(
KEEPFILTERS(VALUES(Master[Date])),
CALCULATE(SUM('Master'[Order_Demand]))
)
RETURN

IF(CONTAINS('SlicerTable''SlicerTable'[LineDescription]"Actuals"), VALUEZBLANK())
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Beefcake , Try

 

VAR VALUEZ = AVERAGEX(
Filter(values(Master[Date]), Master[Date] <Date(2015,10,06)),
CALCULATE(SUM('Master'[Order_Demand]))
)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Beefcake , Try

 

VAR VALUEZ = AVERAGEX(
Filter(values(Master[Date]), Master[Date] <Date(2015,10,06)),
CALCULATE(SUM('Master'[Order_Demand]))
)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That worked, thanks very much. Not sure why I insisted on continuing with KEEPFILTERS

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors