# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

## Qlik sense : set analysis (and / or)

HI Experts,

How do I use an and / or in an set analysis expression in qlik sense.

Thanks

Erenst

1 Solution

Accepted Solutions
Honored Contributor II

## Re: Qlik sense : set analysis (and / or)

Hi,

Refer below example,

1) =Count({\$<Type={'Accepted Lead'}>+<Type={'Instructed Lead'},ProductId-={'5'}>}TicketId)

above set expression will counting where TicketId is Type 'Accepted Lead' OR 'Instructed Lead':

3) Count(if(Completion_Date <= Due_Date and (Source = 'Assignments' or (Source = 'Tasks' and TASK_TYPE = 'Product')),Task_ID_New))

if we convert above expression into Set analysis it will be look like below,

count({<Source={'Assignments'},ID={"=Completion_Date<=Due_Date"}>+<Source={'Tasks'},TASK_TYPE={'Product'},ID={"=Completion_Date<=Due_Date"}>} Task_ID_New)

also check this beginners material

Hope this helps to you

Regards,

Deva

5 Replies
Honored Contributor II

## Re: Qlik sense : set analysis (and / or)

Hi,

Refer below example,

1) =Count({\$<Type={'Accepted Lead'}>+<Type={'Instructed Lead'},ProductId-={'5'}>}TicketId)

above set expression will counting where TicketId is Type 'Accepted Lead' OR 'Instructed Lead':

3) Count(if(Completion_Date <= Due_Date and (Source = 'Assignments' or (Source = 'Tasks' and TASK_TYPE = 'Product')),Task_ID_New))

if we convert above expression into Set analysis it will be look like below,

count({<Source={'Assignments'},ID={"=Completion_Date<=Due_Date"}>+<Source={'Tasks'},TASK_TYPE={'Product'},ID={"=Completion_Date<=Due_Date"}>} Task_ID_New)

also check this beginners material

Hope this helps to you

Regards,

Deva

Not applicable

## Re: Qlik sense : set analysis (and / or)

Thanks for the quick response, just a question, what is the "ID" field you use.

count({<Source={'Assignments'},  ID=  {"=Completion_Date<=Due_Date"}>+<Source={'Tasks'},TASK_TYPE={'Product'},ID={"=Completion_Date<=Due_Date"}>} Task_ID_New)

Thanks

Erenst

Honored Contributor II

## Re: Qlik sense : set analysis (and / or)

Hi,

It's RowNo()  AS  ID field from back-end script. Thanks

Not applicable

## Re: Qlik sense : set analysis (and / or)

Thanks you

Honored Contributor II

## Re: Qlik sense : set analysis (and / or)

Hi,

If it's all ok then can you close this thread by marking correct answer or mark it assumed answer. Thanks

Regards, Deva