Forum Discussion

cheid_4838's avatar
cheid_4838
Helper IV
2 years ago
Solved

Need help converting SQL Statement to DAX

I need to convert a SQL statement using "CASE" to a DAX statement.  I want to have the results show "1" so I can calculate the total number of orders that have a glnumber beginning with 400 and an in...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi cheid_4838 ,

     

    You can try calculated column like below:

    Vol = 
    IF (
        LEFT('YourTable'[ivd_glnum], 3) = "400" && 
        LEFT('YourTable'[ivh_invoicenumber], 1) <> "S",
        1,
        0
    )
    

     

    Best Regards,
    Adamk Kong

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly