Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

pawwy1415
Contributor II

if logic help

Hi Experts,

Can any one please help me to apply the below four oracle logics in to Qlik.

     nvl(a.datasecurityid, b.datasecurityid)               as datasecurityid,

      nvl(a.riskfactorid, b.riskfactorid)                        as riskfactorid,

      decode(p_reportSource, 'a', b.plvametricid,

                             'b', b.sensbasedpnlmetricid,

                             nvl(a.pnlMetricid, b.sensbasedpnlmetricid))      as     pnlMetricid,

      nvl(p_reportSource, nvl(a.reportsource, 'b'))                             as reportSource

Thanks in advance.

petter-s

Could you please help me on this.

1 Solution

Accepted Solutions
MVP
MVP

Re: if logic help

The Qlik Alt() function will work very similar to the Oracle NVL() function.

The combination of Pick() and Match could work similar to the Oracle DECODE.

So I think this should be very close to what you need:

     Alt( a.datasecurityid , b.datasecurityid )     AS datasecurityid,

     Alt( a.riskfactorid , b.riskfactorid )               AS riskfactorid,

     Pick( Match( p_reportSource ,  'a' , 'b' ) + 1

         , Alt( a.pnlMetricid, b.sensbasedpnlmetricid )

         , b.plvametricid

         , b.sensbasedpnlmetricid

    ) AS pnlMetricid,

    Alt( p_reportSource , a.reportsource , 'b' ) AS reportSource


1 Reply
MVP
MVP

Re: if logic help

The Qlik Alt() function will work very similar to the Oracle NVL() function.

The combination of Pick() and Match could work similar to the Oracle DECODE.

So I think this should be very close to what you need:

     Alt( a.datasecurityid , b.datasecurityid )     AS datasecurityid,

     Alt( a.riskfactorid , b.riskfactorid )               AS riskfactorid,

     Pick( Match( p_reportSource ,  'a' , 'b' ) + 1

         , Alt( a.pnlMetricid, b.sensbasedpnlmetricid )

         , b.plvametricid

         , b.sensbasedpnlmetricid

    ) AS pnlMetricid,

    Alt( p_reportSource , a.reportsource , 'b' ) AS reportSource


Community Browser