Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
whiteside
New Contributor III

How to use IF clause if lower level data set consist of multiple levels

Dear Qlik Community,

I am facing an issue with an If clause.

You see I am looking at 1 Shipment. 1 Shipment could have n status or text.

The Formular in the Field "Exonerated Text/Status" is as followed:

If (

    [Textcode key] =('T06') or [Textcode key] =('T08') or [Textcode key] =('T14') ,'Exonerated (textcode)'   

        ,If(

            [Status code]=('U10') or [Status code]=('F02') or [Status code]=('F06') or [Status code]=('F09') or [Status code]=('S36') or [Status code]=('S94'),'Exonerated (Status Code)'

                ,'Evaluated'))

Now if i delete the dimension of the "Status Code"

This is the what happens.

Actualy I expect here the value "Exonerated (Status Code).

Can anyone help me with the correct syntax?

kind regards

whiteside

1 Solution

Accepted Solutions

Re: How to use IF clause if lower level data set consist of multiple levels

May be try this

MaxString(

If([Textcode key] =('T06') or [Textcode key] =('T08') or [Textcode key] =('T14') ,Dual('Exonerated (textcode)', 3),

If([Status code]=('U10') or [Status code]=('F02') or [Status code]=('F06') or [Status code]=('F09') or [Status code]=('S36') or [Status code]=('S94'), Dual('Exonerated (Status Code)', 2), Dual('Evaluated', 1))))

View solution in original post

2 Replies

Re: How to use IF clause if lower level data set consist of multiple levels

May be try this

MaxString(

If([Textcode key] =('T06') or [Textcode key] =('T08') or [Textcode key] =('T14') ,Dual('Exonerated (textcode)', 3),

If([Status code]=('U10') or [Status code]=('F02') or [Status code]=('F06') or [Status code]=('F09') or [Status code]=('S36') or [Status code]=('S94'), Dual('Exonerated (Status Code)', 2), Dual('Evaluated', 1))))

View solution in original post

whiteside
New Contributor III

Re: How to use IF clause if lower level data set consist of multiple levels

Dear Sunny,

you are a live saver. I would not figure this out in a million years.
I have never heard about "DUAL". You are genius #TrulyALegend

Thanks again.

Cheers

whiteside