Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

OR Condition in Set expression

Hi All,

I have below sample table, where count column display the count of Project if it is marked yes in MIL_1 or MIL_2 or both. I am using below Set expression for Count column.

(Count(distinct{<MIL_1={'Yes'}>}ProjectID) + Count(distinct{<MIL_2={'Yes'}>}ProjectID))

 

ProjectIDMIL_1MIL_2Count 
21Yes 1 
32Yes 1 
45YesYes21
32 Yes1 
56 Yes1 
67Yes 1 
89YesYes21

 

Above formula works well, if I have 'Yes' in any one of the column but not if 'Yes' present in both the columns.

Could you please tell help me on this.

 

Thanks in advance!

Gayatri

Labels (1)
2 Replies
MVP
MVP

Try:

=Count(DISTINCT {<MIL_1={'Yes'}> + <MIL_2={'Yes'}>} ProjectID)

Creator II
Creator II

Cool Thanks!

I just realized the same after posting question. Thanks for you reply!