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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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. 

 

 

WholdsActivity Date
random numbers04-10-22
random numbers04-12-22
random numbers03-06-22
random numbers02-28-22

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 

You can use

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

View solution in original post

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please check the formula.

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.
Anonymous
Not applicable

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

 

tamerj1
Super User
Super User

Hi @Anonymous 

You can use

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

Anonymous
Not applicable

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors