Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
jacek27031
Contributor II
Contributor II

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.