cancel
Showing results for
Did you mean:
Helper I

## Average Calls per day, grouped by month

How do you calculate the average of [wholds] in the month? Activity date is connected to a date table.

Idealy, Id like to be able to know how many [wholds] a Sales rep made per day based off the number of days in the month.

Essentially it would be the disctinct count of wholds in the month divided by the number of days in the month, and I could put it into a matrix/table that would know which month the calculation corresponds to.

 Wholds Activity Date random numbers 04-10-22 random numbers 04-12-22 random numbers 03-06-22 random numbers 02-28-22

1 ACCEPTED SOLUTION
Super User

Hi @NMonte

You can use

DIVIDE ( TableName[Wholds], COUNTROWS ( 'VALUES ( "Date'[Date] ) ) )

4 REPLIES 4
Community Support

Hi @NMonte ,

``````Meaasure =
VAR count_wholds =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Wholds] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Activity Date].[Year] = SELECTEDVALUE ( 'calendar'[Date].[Year] )
&& 'Table'[Activity Date].[Month] = SELECTEDVALUE ( 'calendar'[Date].[Month] )
)
)
RETURN
count_wholds / COUNTROWS ( 'calendar' )
``````

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Helper I

It did not work, I take it 'calendar' is the calendar table I have attached to the activity date.

Super User

Hi @NMonte

You can use

DIVIDE ( TableName[Wholds], COUNTROWS ( 'VALUES ( "Date'[Date] ) ) )

Helper I

This worked if the columns in the matrix are from the Date/Calendar table used and not from the Date from the Datatable.

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### 2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors