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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
TJK
Helper I
Helper I

Average Monthly Count dynamically with Start Dates

I'm trying to create a Dax Calculation where it gives me the average number of dates entered monthly for the company or for specific employees selected in a slicer. If an employee is selected in the slicer, it must take into account the employees start date, so if a time range is selected before the employee started working, then it will dynamically calculate based on the number of months the employee has been employed.

 

For example, an employee starts work on December 1st 2022 and enters 2 dates in December and 4 dates in January. The company as a whole entered 6 dates in November, 9 dates in December and 12 dates in January.

 

If the enduser selects November through January in the slicer, the company average will be 9 dates entered per month. Then if the enduser selects the employee, it will show 3 dates entered per month because it's not including November which is the month before the employee started.

 

If in February the company and employee both have 0 dates entered, the company calculation would be (6+9+12+0)/4 = 6.75 and the employee calculation would be (2+4+0)/3 = 2.

 

I was able to come up with a calculation that works for last year when an employee is selected, but when an employee is not selected, it still uses the max employee start date for the company. This is also for the entire year and does not work when selecting months in the slicer.

 

Leads Assigned Weekly Average Last Year = IF(YEAR(MAX('SDRs (Accounts)'[Start Date]))=YEAR(TODAY())-1,DIVIDE([Leads Assigned],52-WEEKNUM(MAX('SDRs (Accounts)'[Start Date]))),DIVIDE([Leads Assigned],52))
 
Leads Assigned =CountA(Lead Date)
1 REPLY 1
nirali_arora
Resolver II
Resolver II

You can add a month year column and use the following formula :

Divide( distinctcount('SDRs (Accounts)'[Start Date]), Calculate(distinctcount('SDRs (Accounts)'[Start  Month Year]),REMOVEFILTERS('SDRs (Accounts)'[Employee])))

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.