Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
whiteside
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
sunny_talwar

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
sunny_talwar

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))))

whiteside
Contributor III
Contributor III
Author

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