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: 
Not applicable

If statement with Set Analysis

I have the following bit of Set Analysis in a Bar Chart:

Count({1<ARRIVAL_DATE= {"$(=Date(Today(), 'DD/MM/YYYY'))" },AREA_GROUP -={'B'}>}DISTINCT CALL_NUMBER)

But I would like it to only apply if RESPONSE_TIME > TARGET_RESPONSE

Could anyone please help.

Many thanks

Paul

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You may have to use an if statement:

Count({1<ARRIVAL_DATE= {"$(=Date(Today(), 'DD/MM/YYYY'))" },AREA_GROUP -={'B'}>}DISTINCT

if( RESPONSE_TIME > TARGET_RESPONSE, CALL_NUMBER))


Doing a comparison between fields of the same record is not always possible. See this document: set_analysis_intra-record.qvw


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try

Count({1<ARRIVAL_DATE= {"$(=Date(Today(), 'DD/MM/YYYY'))" },AREA_GROUP -={'B'}>}DISTINCT

     if (RESPONSE_TIME > TARGET_RESPONSE, CALL_NUMBER, 0)

)

or

if (RESPONSE_TIME > TARGET_RESPONSE,

     Count({1<ARRIVAL_DATE= {"$(=Date(Today(), 'DD/MM/YYYY'))" },AREA_GROUP -={'B'}>} DISTINCT CALL_NUMBER)

,0)

Let me know

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You may have to use an if statement:

Count({1<ARRIVAL_DATE= {"$(=Date(Today(), 'DD/MM/YYYY'))" },AREA_GROUP -={'B'}>}DISTINCT

if( RESPONSE_TIME > TARGET_RESPONSE, CALL_NUMBER))


Doing a comparison between fields of the same record is not always possible. See this document: set_analysis_intra-record.qvw


talk is cheap, supply exceeds demand
Not applicable
Author

Many thanks, this one worked.

SunilChauhan
Champion II
Champion II

count({<RESPONSE_TIME={>$(=TARGET_RESPONSE)}>}CALL_NUMBER)

Sunil Chauhan
Not applicable
Author

Thanks for your help.