Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
gfisch13
Contributor II

Conditional Expression

Hi - I'm having an issue understanding how/when to use functions.  I'm trying to count distinct case numbers where:

Case Type = Claim AND Amount_At_Risk >= 250,000

Can anyone suggest an expression to use??   Also, is there any documentation to research for expressions so I can learn from a good starting point???

Thanks!

Tags (1)
1 Solution

Accepted Solutions

Re: Conditional Expression

Count( {<Case_Type = {'Claim'}, Amount_At_Risk = {'>=250000'}>} Distinct CaseNumber)

View solution in original post

10 Replies
miguelbraga
Valued Contributor III

Re: Conditional Expression

Here is an expression you can use:

If by 250,000 you meant 250:

Count({$<Type = 'Claim', Amount_At_Risk = {'>=250)'}>} distinct [you desired dimention])

If not, you meant 250000:

Count({$<Type = 'Claim', Amount_At_Risk = {'>=250000)'}>} distinct [you desired dimention])

PS: Replace [you desired dimention] by your field for example:

Count({$<Type = 'Claim', Amount_At_Risk = {'>=250000)'}>} distinct ID_Number)

Hope this serves you

Regards,

MB

trdandamudi
Honored Contributor II

Re: Conditional Expression

May be as below:

Count( {<Case_Type = {'Claim'}, Amount_At_Risk = {'>=250000'}>} Distinct CaseNumber)



Note: I updated as Sunny mentioned below:

Replace CaseNumber field with your field name,

Re: Conditional Expression

I think you mean this

Count( {<Case_Type = {'Claim'}, Amount_At_Risk = {'>=250000'}>} Distinct CaseNumber)

gfisch13
Contributor II

Re: Conditional Expression

This is what the expression builder is showing.  It accepted your expression as shown above but as you can see there is nothing showing on the chart.  Which part is the set modifier?Expressions.JPG

trdandamudi
Honored Contributor II

Re: Conditional Expression

Yes.... I will update the post.... Thanks.... 

trdandamudi
Honored Contributor II

Re: Conditional Expression

Can you please share a small sample......

Re: Conditional Expression

I think you missed an equal sign after AMOUNT_AT_RISK_USD field

Re: Conditional Expression

Count( {<Case_Type = {'Claim'}, Amount_At_Risk = {'>=250000'}>} Distinct CaseNumber)

View solution in original post

gfisch13
Contributor II

Re: Conditional Expression

Perfect, such a small detail makes a difference.  Where would you suggest I go to learn about sets, other expressions.  This is confusing!!!