Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Solved! Go to Solution.
@Anonymous
Try add All() function to set the context to all table:
var emps=CALCULATE(SUM('Employee data for PBI'[# Terminated]), filter(All('Employee data for PBI'), flag =1))
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@Anonymous
Try add All() function to set the context to all table:
var emps=CALCULATE(SUM('Employee data for PBI'[# Terminated]), filter(All('Employee data for PBI'), flag =1))
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try a new measure like
# Under 1 year =
var workStartDate=('Employee data for PBI'[Work Start Date])
var workEndDate=('Employee data for PBI'[Final Process Date])
var seniority= DATEDIFF(workStartDate, workEndDate, DAY)
var flag=IF(seniority>=30 && seniority<=365,1,0)
var emps=CALCULATE(SUM('Employee data for PBI'[# Terminated]), filter('Employee data for PBI', flag =1))
return emps
thanks @amitchandak! it looks like it works, but the measure doesn't sum the total number of employees terminated.
if I put the data on a table for each employee I do see the values (0 or 1)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |