Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jacek27031
Contributor III
Contributor III

How to add second condition?

Hi Eveyone,

I have a code as below:

if(([BP2]='XXX'),
Sum(
RangeMax(
([# STI Plan] * (([Cprice] - ([XXX CDF] / 1.23 / [ER Plan] * (1 - T2_GP) * (1 - T1_GP))))),0)),
Sum(
RangeMax(
([# STI Plan] * (([Cprice] - ([CDF Calc] / 1.23 / [ER Plan] * (1 - T2_GP) * (1 - T1_GP))))),0)))

How to add second condition? Else_expr as you can see in both cases is the same.  

if(((Front='1'),
Sum(
RangeMax(
([# STI Plan] * (([Cprice] - ([SRP] / 1.23 / [ER Plan] * (1 - T2_GP) * (1 - T1_GP))))),0)),
Sum(
RangeMax(
([# STI Plan] * (([Cprice] - ([CDF Calc] / 1.23 / [ER Plan] * (1 - T2_GP) * (1 - T1_GP))))),0)))

 

 

Labels (2)
1 Reply
Mario_Petre
Support
Support

The "else" condition can be another "if", since "elseif" is not supported directly: if - script and chart function ‒ Qlik Sense on Windows

The if function has three parameters, conditionthen and else, which are all expressions. The two other ones, then and else, can be of any type.