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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Calculate average of measure values datesbetween

I have two tables 1. Dimdate = a date key 'Table' = data table with PERSON_ID

 

They are not related as I have created a measure to count % attendance.

If I have calculate the table below:

Absence average.PNG

Is there a way to calculate the average of percentages for PERSON_ID = 135 for dates between DATE(2018,1,1),DATE(2018,12,31) e.g. average of (80.49% & 60% = 70.25%)

 

I've tried these but cant seem to get them to work.

 

Measure 4 = AVERAGex(VALUES('Employee Absence Full Table'[Month and Year]),[Measure 3])
 
or 
Measure 4 = CALCULATE(AVERAGex('Employee Absence Full Table',[Measure 3]),DATESBETWEEN('DimDate'[Dates],DATE(2018,01,01),DATE(2018,12,31)))
 
 
1 REPLY 1
AlB
Community Champion
Community Champion

Hi @Anonymous 

Place this measure in the visual you show, activate the row subtotals and you'll have the result in the row subtotals. For the dates, you can either add slicers or if you want it hard coded, you can use a CALCULATE wrapping the measure.

Measure_TOT = 
AVERAGEX(DISTINCT(DimDate[Month Year]),[Measure 7]) 

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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