• I see three iif functions in your expression, but there should only be two. Remove the last one.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP