Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mshailaja
Contributor III
Contributor III

if condition

Hi

i have table called  status  in which Incidents status wil bee updated as

RE,CL,OP,ACK,SUSP

The user wants only ACK,SUSP,OP as Raised Incidents

and RE as Resolved Incidents.

I have to  show the incidents  for the particular group in the Graph as Raised Incidents and resolved Incidents

Can anyone help me to write the if condition in script ,  so that i can get the graph like below

4 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi,

May be like this

Dimension: Incidents

Expression: Count({<Incidents={'ACK,SUSP,OP'}>}Incidents)

Regards,

Andrey

dsharmaqv
Creator III
Creator III

use 2 expression  in chart

Raised

Count({<Incidents={'ACK,SUSP,OP'}>}Incidents)

Resolved

Count({<Incidents={'RE'}>}Incidents)

avinashelite

You could create new field in the script like this

if( status='ACK' or status='SUSP' or status='OP','Raised Incidents','Resolved Incidents') as New_Status


add the New status as the dimension


and expression

Count(Incidents)

rahulpawarb
Specialist III
Specialist III

Hello Sailaja,

Please use below sample expressions:

     If(Match(Status, 'ACK', 'SUSP', 'OP') > 0, 1, 0) AS Received,

     If(Status='RE', 1, 0) AS Resolved

Refer attached sample application.

Regards!
Rahul