Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
mahishah
Contributor
Contributor

Count of distinct function not working as expected

Hello, 

I have 2 columns with either a True string or false string 
I want the distinct count of number of values in a 3rd column such that these two columns are filtered to True 
Following is not working

COUNT( {<[Col 1] = {'True'}, [Col 2] = {'True'}>} DISTINCT [Col 3])

Thank you for the help 

 

 

Labels (4)
1 Solution

Accepted Solutions
9 Replies
mahishah
Contributor
Contributor
Author

Basically AND operation within this count is not working, it is taking it as OR i think 

BrunPierre
Partner - Master
Partner - Master

COUNT({<[COL 1]= {'True'}> * <[COL 2]= {'True'}>} DISTINCT [COL 3])

mahishah
Contributor
Contributor
Author

This is also not working 😞

* is for AND condition right?

BrunPierre
Partner - Master
Partner - Master

In combining sets,

OR -> +

AND -> *

Post an example and the expected result.

Kushal_Chawda

@mahishah  try below

COUNT(DISTINCT {<[Col 3] = p({<[Col 1] = {'True'}>}) * p({<[Col 2] = {'True'}>}) >}  [Col 3])
mahishah
Contributor
Contributor
Author

Sure, please see below snapshot of what i want to do. 
Please note there are more cols in the table than C, A and B due to which there could be multiple entries in the table like 2905 entry in column C does. 

Making a custom measure in qlik sense just to elaborate. 

Capture.PNG

mahishah
Contributor
Contributor
Author

This is also not working. 

please see below snapshot of what i want to do. 
Please note there are more cols in the table than C, A and B due to which there could be multiple entries in the table like 2905 entry in column C does. 

Making a custom measure in qlik sense just to elaborate. Capture.PNG

BrunPierre
Partner - Master
Partner - Master

BrunPierre_0-1681623988987.png

mahishah
Contributor
Contributor
Author

Got it! 

Was an error in my table!

Thanks