Forum Discussion

min-E's avatar
min-E
Helper I
2 years ago
Solved

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
  • 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.

4 Replies

  • 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.

     

    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.

    • lbendlin's avatar
      lbendlin
      Super User

      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.

      • min-E's avatar
        min-E
        Helper I

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