Forum Discussion
Anonymous
6 years agoNot applicable
New column if statement
Hi I have used the simple if command as below Late tasks = if(Tasks[TaskFinishDate] - RELATED(TaskBaselines[TaskBaselineFinishDate]) > 1 , 1 , 0) does anyone know why is is not working correctl...
- 6 years ago
It would be similar to
DATEDIFF(<start_date>, <end_date>, <interval>)The interval is the units so it would be one of these
- SECOND
- MINUTE
- HOUR
- DAY
- WEEK
- MONTH
- QUARTER
- YEARCheck it here https://docs.microsoft.com/en-us/dax/datediff-function-dax
HotChilli
6 years agoCommunity Champion
It would be similar to
DATEDIFF(<start_date>, <end_date>, <interval>)
The interval is the units so it would be one of these
- SECOND
- MINUTE
- HOUR
- DAY
- WEEK
- MONTH
- QUARTER
- YEAR
Check it here https://docs.microsoft.com/en-us/dax/datediff-function-dax
Anonymous
6 years agoNot applicable
I still have issue with the below formula
Late tasks = IF((DATEDIFF(Tasks[TaskActualFinishDate],RELATED(TaskBaselines[TaskBaselineFinishDate]),DAY))<0,"Late"," ")
is that wrong as I am getting wrong result
can you help please ?