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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
min-E
Helper I
Helper I

Average by Date Range / Dynamic Average based on Slicer

Hello,

 

I have a list of dates and their sum.

 

Looking to create a Card that displays the Average based on what is selected in a Date Slicer.

 

Tried applying various Solutions from other posts and none seem to work for me. Help is so so appreciated.

 

Date From 2/2/2024 To 2/4/2024 =

Sum(281, 88, 218) / 4 =

Average 146.75

 

DateSum
2/16/2024 12:21212
2/7/2024 0:2298
2/16/2024 12:223
2/2/2024 17:1288
2/2/2024 14:00281
2/4/2024 10:45218
2/4/2024 22:450
2/5/2024 0:470
2/6/2024 10:1894
2/5/2024 10:44134
1 ACCEPTED SOLUTION

Proper display of durations is always tricky especially if you try to sort multiple values. If it is only a single value in a card visual then you can use the FORMAT function to show it as needed. You will need to decide if you want to suppress zero hours and/or days.  Probably also don't want to show leading zeros for hours.

View solution in original post

4 REPLIES 4
min-E
Helper I
Helper I

THANK YOU. You are right. And I think that helps me understand my problem.

My Sum is a duration in minutes.

Then I have another custom column to format that into D H M - this is not changing in my card.

avg dhm.png

 

Is there a way to format my Sum as Duration (in minutes) and round the average to the closest whole number?

Or is the issue the DHM formatting in general?

 

Note - let me know if this should be a separate post. You did answer my original question. Didn't mean to not describe entire issue - just looking at this way too long.

Proper display of durations is always tricky especially if you try to sort multiple values. If it is only a single value in a card visual then you can use the FORMAT function to show it as needed. You will need to decide if you want to suppress zero hours and/or days.  Probably also don't want to show leading zeros for hours.

Thank you. Took the AVERAGE as a Measured Column. Added another column to format that and it works to show DHM.

lbendlin
Super User
Super User

A simple AVERAGE(<column>)  will do.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors