Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
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
Highlighted

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
Highlighted

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

Highlighted
Contributor III
Contributor III

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