Forum Discussion
New Hires Count
- 2 years ago
Hello Saad_Hanif456 ,
You have not specified anything about relationship between 'Calendar' and 'Payroll' table.
Considering you have an active relationship with 'Hiring date'
Head Count =DISTINCTCOUNT([CNIC ])
If not, considering you have an active relationship with 'Payroll Month' and a inactive relationship with 'Hiring date'Head Count = CALCULATE(DISTINCTCOUNT([CNIC ]), USERELATIONSHIP(Payroll[Hiring Date],'Calendar'[Date]))
I hope this will help you 🙂 - 2 years ago
Hello Saad_Hanif456 ,
Please try below DAX
Head Count =VAR _selectedMonthYear = FORMAT(MAX('Calendar'[Date]),"YYYY-MM")VAR _table = SUMMARIZE(ALL(Payroll), [CNIC ], "HDdate", FORMAT(MIN([Hiring Date]), "YYYY-MM"))RETURN COUNTROWS(FILTER(_table, [HDdate] = _selectedMonthYear))
I hope this will help you 🙂
Hello Saad_Hanif456 ,
You have not specified anything about relationship between 'Calendar' and 'Payroll' table.
Considering you have an active relationship with 'Hiring date'
Head Count =DISTINCTCOUNT([CNIC ])
If not, considering you have an active relationship with 'Payroll Month' and a inactive relationship with 'Hiring date'
Head Count = CALCULATE(DISTINCTCOUNT([CNIC ]), USERELATIONSHIP(Payroll[Hiring Date],'Calendar'[Date]))