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]))
New Hire PY =
CALCULATE( DISTINCTCOUNT('Roster'[ID]),
SAMEPERIODLASTYEAR('Calendar'[Date]),
USERELATIONSHIP('Calendar'[Date], 'Roster'[Hire Date]))
getting blank output for second formula
getting blank output for second formula
6 Replies
- AnonymousNot 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
)- AnonymousNot applicable
Hi Anonymous, I tried above formula, shwoing blank value
- sergej_og
Super User
Date intelligence....try to use DATEADD or SAMEPRIODELASTYEAR to get your result.
CALCULATE( COUNT(ccc), DATEADD(xxx), USERALTIONSHIP(fff) )
Regards.
- Ashish_Mathur
Super User
Hi,
Share the download link of the PBI file. Show the problem there clearly.