Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
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])))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
12 | |
10 | |
7 | |
7 |
User | Count |
---|---|
18 | |
14 | |
11 | |
11 | |
9 |