Forum Discussion
Anonymous
3 years agoNot applicable
Time between dates using three columns
Hi experts, I have the following data: I want to create a calculated column (either in PQ or DAX - whatever is most suitable) to calculate tenure in months based on Last Hire Date. H...
- 3 years ago
Anonymous ,
try this DAX formula,
Tenure in Months = IF ( 'Table'[Last Hire Date] > 'Table'[Termination Date], DATEDIFF ( 'Table'[Hire Date], 'Table'[Termination Date], MONTH ), DATEDIFF ( 'Table'[Last Hire Date], 'Table'[Termination Date], MONTH ) )Thanks,
Arul
Arul
3 years agoSuper User
Anonymous ,
try this DAX formula,
Tenure in Months =
IF (
'Table'[Last Hire Date] > 'Table'[Termination Date],
DATEDIFF ( 'Table'[Hire Date], 'Table'[Termination Date], MONTH ),
DATEDIFF ( 'Table'[Last Hire Date], 'Table'[Termination Date], MONTH )
)
Thanks,
Arul