Forum Discussion

haassiej's avatar
haassiej
Helper I
7 years ago
Solved

DAX Case When

Hi guys,

 

I could really use your help turning the SQL formula below into a DAX format. What is the DAX-equivalent of a 'case when..' in SQL? Help is very much appreciated!

 

 

 

case when nvl(amount_remaining,0) <> 0

and (sysdate - due_date) > 0

then (sysdate - due_date)

else 0 end

 

 

Kind Regards

 

  • Try looking at the IF() function, and use multiple criteria by joing them with the double ampersand.

     

    = IF(A = 1 && B = 2, Does This If True, Does This if False)

2 Replies

  • edhans's avatar
    edhans
    Community Champion

    Try looking at the IF() function, and use multiple criteria by joing them with the double ampersand.

     

    = IF(A = 1 && B = 2, Does This If True, Does This if False)