Forum Discussion

wbarnes's avatar
wbarnes
Frequent Visitor
3 years ago
Solved

Converting Excel IF/OR/AND statement to DAX

I have been trying to convert the below Excel nested IF statement to DAX, and I cannot seem to get anything to work for me, maybe I'm making this more complicated than it really is. I'm new to DAX an...
  • adudani's avatar
    3 years ago

    Hi wbarnes ,

     

    Create the following calculated column using DAX.

     

    Completed by DueDate =
    IF( 'Table'[Due Date] = 0 || ISBLANK('Table'[Due Date]),
        "Due Date Not Assigned",
        IF( 'Table'[Completed Date]>= 'Table'[Assigned Date] && 'Table'[Completed Date]<= 'Table'[Due Date],"Yes","No"))
     
    There are more efficient ways to do this with switch true statements. However, this should get the job done.

     

    Appreciate a thumbs up if you found this helpful.

     

    Please accept this solution if the query is resolved.