Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

"in" statement? or something like it? help! :)

Hey guys. Is there a way to use an "IN" statement, like in SQL, inside of Qlikview?

Here's the piece of my expression where I need to use it (I know that my expression isn't complete):

sum(if(apel_ltr_snt_dt - [Received_Date]<=60 and dsft_sevy_ds = 'Standard60' and [Medicare Type] in  'C', 'D', 'W', 'P'

See where I used the "in" at the end?

Can this be done? If so, how would I write it?

Thanks!

1 Solution

Accepted Solutions
manideep78
Valued Contributor

Re: "in" statement? or something like it? help! :)

We cannot use IN keyword in QlikView as like in SQL.

But you can write the same expression in Set Analysis.

Make sure that Set Analyis should be used with Aggregation functions.

Sum({<apel_ltr_snt_dt-[Received_Date]={"<=60"},dsft_sevy_ds={'Standard60'},[Medicare Type]={'C','D','W','P'}>}XXX)

XXX- Field that you want to calculate sum

Hope this helps

Cheers!!

3 Replies

Re: "in" statement? or something like it? help! :)

Like this:

match([Medicare Type], 'C', 'D', 'W', 'P')


talk is cheap, supply exceeds demand
manideep78
Valued Contributor

Re: "in" statement? or something like it? help! :)

We cannot use IN keyword in QlikView as like in SQL.

But you can write the same expression in Set Analysis.

Make sure that Set Analyis should be used with Aggregation functions.

Sum({<apel_ltr_snt_dt-[Received_Date]={"<=60"},dsft_sevy_ds={'Standard60'},[Medicare Type]={'C','D','W','P'}>}XXX)

XXX- Field that you want to calculate sum

Hope this helps

Cheers!!

Not applicable

Re: "in" statement? or something like it? help! :)

Thanks guys!

Community Browser