Forum Discussion
Anonymous
2 years agoNot applicable
Last year count with userelationship dax
Hi experts, Need to calculate last year new hire count Please help. New Hire = CALCULATE( COUNT('Exit,Roster,Leave,WFH'[ID]), USERELATIONSHIP('Calendar'[Date], 'Roster'[Hire Date])) ...
Anonymous
2 years agoNot applicable
Hi Anonymous This modified formula will count the number of new hires for the previous year based on the 'Hire Date' relationship with the 'Calendar' table.
CALCULATE(
COUNT('Exit,Roster,Leave,WFH'[Axtria ID]),
USERELATIONSHIP('Calendar'[Date], 'Roster'[Hire Date]),
'Calendar'[Year] = YEAR(TODAY()) - 1
)
- Anonymous2 years agoNot applicable
Hi Anonymous, I tried above formula, shwoing blank value
- sergej_og2 years ago
Super User
Date intelligence....try to use DATEADD or SAMEPRIODELASTYEAR to get your result.
CALCULATE( COUNT(ccc), DATEADD(xxx), USERALTIONSHIP(fff) )
Regards.- Anonymous2 years agoNot applicable
Hi sergej_og ,
New Hire PY =CALCULATE( DISTINCTCOUNT('Roster'[ID]),SAMEPERIODLASTYEAR('Calendar'[Date]),USERELATIONSHIP('Calendar'[Date], 'Roster'[Hire Date]))
tried above and getting blank output