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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JumoGra
Frequent Visitor

Calculating daily average from sum of day

Hi There,

I'm trying to calculate the daily average of all calls offered, I started off by doing a sum but couldn't figure out how to then divide the sum by the count of column values for the period. I have included my DAX formula in terms of where I got up to. Please let me know if there's even a better way of doing this. Many thanks

AvgWTDCallsOffered =
    CALCULATE(
        SUM('Call Data'[Offered]),
        FILTER(
            ALL(CDCalendar),
            (CDCalendar[Last7Days] = MAX(CDCalendar[Last7Days])) &&
            (CDCalendar[CallDate] <= MAX(CDCalendar[CallDate]))))
1 ACCEPTED SOLUTION
AnalyticsWizard
Solution Supplier
Solution Supplier

@JumoGra 

To calculate the daily average of all calls offered based on your existing DAX formula, you essentially want to divide the sum of calls offered by the number of days in the period. Your formula correctly sums the calls offered but does not account for the number of days over which to average.

 

AvgWTDCallsOffered =
VAR TotalCallsOffered = CALCULATE(
SUM('Call Data'[Offered]),
FILTER(
ALL(CDCalendar),
(CDCalendar[Last7Days] = MAX(CDCalendar[Last7Days])) &&
(CDCalendar[CallDate] <= MAX(CDCalendar[CallDate]))
)
)
VAR CountOfDays = CALCULATE(
DISTINCTCOUNT(CDCalendar[CallDate]),
FILTER(
ALL(CDCalendar),
(CDCalendar[Last7Days] = MAX(CDCalendar[Last7Days])) &&
(CDCalendar[CallDate] <= MAX(CDCalendar[CallDate]))
)
)
RETURN
DIVIDE(TotalCallsOffered, CountOfDays)

 

If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

View solution in original post

2 REPLIES 2
AnalyticsWizard
Solution Supplier
Solution Supplier

@JumoGra 

To calculate the daily average of all calls offered based on your existing DAX formula, you essentially want to divide the sum of calls offered by the number of days in the period. Your formula correctly sums the calls offered but does not account for the number of days over which to average.

 

AvgWTDCallsOffered =
VAR TotalCallsOffered = CALCULATE(
SUM('Call Data'[Offered]),
FILTER(
ALL(CDCalendar),
(CDCalendar[Last7Days] = MAX(CDCalendar[Last7Days])) &&
(CDCalendar[CallDate] <= MAX(CDCalendar[CallDate]))
)
)
VAR CountOfDays = CALCULATE(
DISTINCTCOUNT(CDCalendar[CallDate]),
FILTER(
ALL(CDCalendar),
(CDCalendar[Last7Days] = MAX(CDCalendar[Last7Days])) &&
(CDCalendar[CallDate] <= MAX(CDCalendar[CallDate]))
)
)
RETURN
DIVIDE(TotalCallsOffered, CountOfDays)

 

If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

This has worked perfectly, thank you so much!

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