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

Conditional Count expression

Hi,

I need your help please, how to write this correctly (I get wrong results):

=if([ Quality Assurance Claims Major LOB ]='A&H'

    OR [ Quality Assurance Claims Major LOB ]='Life'

    OR [ Quality Assurance Claims Major LOB ]='Property'

    OR [ Quality Assurance Claims Major LOB ]='Personal Lines',

    if([ Life of Claim ]>'36',  count([Claim Number])))

Must be a way to do it with conditional count (like below), but I don't know how to write it with 'OR':

=count({<[ Quality Assurance Claims Major LOB ]={'A&H'}

     OR [ Quality Assurance Claims Major LOB ]={'Life'}

     OR [ Quality Assurance Claims Major LOB ]={'Property'}

     OR [ Quality Assurance Claims Major LOB ]={'Personal Lines'} ,

     [ Life of Claim ]={'>36'}>}  [Claim Number])



1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I found the solution:

   

=count({<[ Quality Assurance Claims Major LOB ]={'A&H'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

    + count({<[ Quality Assurance Claims Major LOB ]={'Life'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

    + count({<[ Quality Assurance Claims Major LOB ]={'Property'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

    + count({<[ Quality Assurance Claims Major LOB ]={'Personal Lines'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

  

And it works well

View solution in original post

7 Replies
agigliotti
Partner - Champion
Partner - Champion

what's the error you get?

Anonymous
Not applicable
Author

I don't get an error, just wrong results.

jayanttibhe
Creator III
Creator III

Try this -

if(Wildmatch([Quality Assurance Claims Major LOB],'A&H','Life','Property','Personal Lines')

   and

   [ Life of Claim ]>'36'

,

   count([Claim Number]))

Anonymous
Not applicable
Author

No results at all

jayanttibhe
Creator III
Creator III

can you post sample app ?

Anonymous
Not applicable
Author

I found the solution:

   

=count({<[ Quality Assurance Claims Major LOB ]={'A&H'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

    + count({<[ Quality Assurance Claims Major LOB ]={'Life'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

    + count({<[ Quality Assurance Claims Major LOB ]={'Property'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

    + count({<[ Quality Assurance Claims Major LOB ]={'Personal Lines'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

  

And it works well

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

you don' t need to split your expressions, just use one as it will be a lot more efficient than one you have at the moment

:

=count({<[ Quality Assurance Claims Major LOB ]={'A&H','Life','Property','Personal Lines'}, [ Life of Claim ]={'>36'}>}  [Claim Number])

EDIT: btw. i would use "" (double quotes" for your {">36"} as per HIC suggestion here:

A Primer on Set Analysis

cheers

Lech

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.