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
newhopepdx
Helper III
Helper III

Averaging with gaps in date slicer

The averaging is working as expected until I remove a date from the middle of the selected slicer range. How do I overcome this? The goal would be to be able to not count certain days where the attendance was inflated due to extraordinary situation (like 4/17 which was 826).

 

Here's a screen shot of the data and the measure (that works without gaps).

 
Total Attendance =
CALCULATE(
SUM( 'Attendance'[Attendance] ),
DATESBETWEEN('Calendar'[Date],
FIRSTDATE('Calendar'[Date] ),
LASTDATE( 'Calendar'[Date] )),
ALl('Attendance' )
)
As shown in the photo, the # of events has properly reflected the "unselection" of 4/17 whereas the 5888 total attendance hasn't. I realize that that is because of the "ALL('Attendance') filter, but what is the correct way to modify this measure?
Thanks,

Steve

 

Attendance.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@newhopepdx , I think you need measures like

 

Total Attendance =
CALCULATE(
SUM( 'Attendance'[Attendance] ),
allselected('Attendance' )
)


Avg By Day =
AverageX(Values('Date'[Date]), CALCULATE(
SUM( 'Attendance'[Attendance] ),
allselected('Attendance' )
) )

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

@newhopepdx , I think you need measures like

 

Total Attendance =
CALCULATE(
SUM( 'Attendance'[Attendance] ),
allselected('Attendance' )
)


Avg By Day =
AverageX(Values('Date'[Date]), CALCULATE(
SUM( 'Attendance'[Attendance] ),
allselected('Attendance' )
) )

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! Both measures yielded the correct answer.

Thanks!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors