Good mortning,
I tried to conver the statement in Tableau in SQL server, but I received an error.Could you help me how to return 2 values in the CASE statement in SQL based on certain criteria and multiply them to get the final computed numeri value? When I used multiplying symbol in the CASE statement, I received an error shown as below.
Tableau Statement
IF ([CodingChange] ='Yes' OR [QueryOpportunity]='Yes') THEN [ActualLift] END * IF ZN([!BaseRate]) > 0 THEN [!BaseRate] END
What I tried in SQL server
[Obtained Lift -] AS
CASE
WHEN ([CodingChange] ='Yes' OR [QueryOpportunity]='Yes')
THEN [ActualLift]
* WHEN [!BaseRate] > 0
THEN [!BaseRate]
END;
P.S. Can I also know if I'm supposed to use "WHEN" multiple times in the CASE statement in SQL when I meant to use "ELIF" in Tableau?
I appreciate your help!