Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Interpreting Operator from Excel-file

Good morning everyone

I have a client who is working with an Excel file and has three targets (green, yellow, red) per KPI. To keep it flexbile I created a column for each operator and target and import them as field into Qlikview... Example

KPIValueOP_Target_redTarget_redOP_Target_yellowTarget_yellowOP_Target_greenTarget_green
10>=-0.01>=-0.02<=-0.03
20.136>=0.11>=0.12>=0.13
31>1>0=0
43<=3<=4>=5

Now I want to write in the Script the following:

if(Value&OP_Target_red&Target_red,1,

     if(Value&OP_Target_yellow&Target_yellow,2,

          3

)

)

) as [Target_Color]


My goal is a table chart with "trafficlight expression" where i can enter [Target_Color] and the result is the correct color for each KPI.


But for some reason Qlikview is not recognizing the [OP_Targed_color] as operator...


Thanks for your help!


I hope you understand what I mean


Thanks in advance and regards


Benjamin

1 Solution

Accepted Solutions
MarcoWedel

Hi,

maybe one solution could be:

QlikCommunity_Thread_234273_Pic1.JPG

LOAD KPI,

    Value,

    OP_Target_red,

    Target_red,

    OP_Target_yellow,

    Target_yellow,

    OP_Target_green,

    Target_green,

    If(Evaluate(Value&OP_Target_red&Target_red),

        1,

        If(Evaluate(Value&OP_Target_yellow&Target_yellow),

          2,

          3

          )

      ) as [Target_Color]

FROM [https://community.qlik.com/thread/234273] (html, codepage is 1252, embedded labels, table is @1);

hope this helps

regards

Marco

View solution in original post

2 Replies
MarcoWedel

Hi,

maybe one solution could be:

QlikCommunity_Thread_234273_Pic1.JPG

LOAD KPI,

    Value,

    OP_Target_red,

    Target_red,

    OP_Target_yellow,

    Target_yellow,

    OP_Target_green,

    Target_green,

    If(Evaluate(Value&OP_Target_red&Target_red),

        1,

        If(Evaluate(Value&OP_Target_yellow&Target_yellow),

          2,

          3

          )

      ) as [Target_Color]

FROM [https://community.qlik.com/thread/234273] (html, codepage is 1252, embedded labels, table is @1);

hope this helps

regards

Marco

Not applicable
Author

Vielen lieben Dank!

This was almost exactly what we tried in the first instance but we used evaluate only for the operator field

Now it works perfectly fine!

Thanks and regards from Zurich

Benny