Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi, Gurus, need you help to solve this problem.
Create 1 to many relationships on department field
DAX to calculate active employee numbers
在职人数 = CALCULATE([基础人数], //countrows(employee table)
dim_Date[Date]<=MAX(dim_Date[Date]),
filter(VALUES('Fct_Employees'[Hire Date]),Fct_Employees[Hire Date]<=MAX(dim_Date[Date])),
filter(VALUES('Fct_Employees'[Leave Date]),OR('Fct_Employees'[Leave Date]>Max(dim_Date[Date]),ISBLANK('Fct_Employees'[Leave Date]))))
how to showed it correctly?
thanks
--Tonny
Solved! Go to Solution.
hI, jcalheir
thank you so much for the help, try it, but still wrong. however , when i put department field of employee table into matrix, it shows correct number for each department.
please see below figures
Why do you need the first filter? ( dim_Date[Date]<=MAX(dim_Date[Date]))
Ty as well to use just one filter function. Would you try this?
在职人数 =
CALCULATE (
[基础人数],
//countrows(employee table),
FILTER (
'Fct_Employees',
Fct_Employees[Hire Date] <= MAX ( dim_Date[Date] )
&& Fct_Employees[Leave Date] > MAX ( dim_Date[Date] )
&& ISBLANK ( 'Fct_Employees'[Leave Date] )
)
)
Hi, Jcalheir
I found the root cause of this issue, it was caused by a blank existed in front of field value. removed it, it shows correlcy.
thanks
--Tonny
hI, jcalheir
thank you so much for the help, try it, but still wrong. however , when i put department field of employee table into matrix, it shows correct number for each department.
please see below figures
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.