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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.