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.
Hi,
I have a table with employee Details.
sample data: -
emp_id emp_name date_of_joining
1 A 14-01-2023
2 B 18-01-2023
3 C 01-02-2023
4 D 10-02-2023
5 E 11-03-2023
calculation example for one employee: -
emp_id date_of_joining diff_till_feb_in_months[28/02/2023] diff_till_march_in_months[31/03/2023]
1 14-01-2023 1.5123 2.5315
output: -
month AVG_Exp
Feb 1.1075
March 1.84
For calculating the date difference mentioned above for emp A= 1.5123 which is calulated based on the difference from date_of_joining to 28/02/2023 in days and divide it by 30.4166666667[average days in a month].
I want to create a bar chart with month in x axis and I want to show the average experience of employee month-wise.
and I want to show for the last 3 years. we can have a year slicer so that we can select a year and show data only for that year.
Note:- if the person has joined in Feb and we are calculating average experience in Jan then don't consider that employee as "doj>selected date period"
Try the approach below: If it works for you, kindly mark this as solution so anyone with similar issues can easily find it.
Measure =
VAR JoiningDate = MAX(date_of_joining)
VAR EndOfCurrMonth = MAX(DateTable[Date])
VAR DaysDifference = MAX(DATEDIFF(JoiningDate, EndOfCurrMonth, DAY), 0)
VAR AverageExperience = DIVIDE(DaysDifference, 30.4166666667, 0)
RETURN IF(AverageExperience = 0, BLANK(), AverageExperience)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
218 | |
88 | |
83 | |
65 | |
56 |