Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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 correctly?
regards 
 

5 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    You will need the Dax DATEDIFF function.  I think you need to pass DAY as the third parameter.

     

    I have just noticed that this question is in the Power Query forum but you wrote some DAX.  That's OK but make sure you create the column in the right place.

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks 

      I am very new in Power bi, 

      could you please tell me an example? 

      I couldn't understnd what the third argumnet is

      thanks