Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
wcamargo
Contributor III
Contributor III

Count + IF + Distinct

Hi all,

 

I'm doing a count of column "Item" if both "field1" and "field2" are empty, but I need to count "distinct" for the column "Item".

 

Actual formula:

Count({< Item={"*"}>}if(len(trim(field1))=0 and len(trim(field2))=0,1 ))

 

I don't know how to include "distinct" on this formula for column item.

 

Does anyone know how to do it?

 

Many thanks,

Wil

Labels (3)
1 Solution

Accepted Solutions
RafaelBarrios
Partner - Specialist
Partner - Specialist

I know that formula 😅

try

Count(distinct {< Item={"*"}>}if(len(trim(field1))=0 and len(trim(field2))=0,Item ))

best,

View solution in original post

2 Replies
RafaelBarrios
Partner - Specialist
Partner - Specialist

I know that formula 😅

try

Count(distinct {< Item={"*"}>}if(len(trim(field1))=0 and len(trim(field2))=0,Item ))

best,

wcamargo
Contributor III
Contributor III
Author

Thank you @RafaelBarrios ! Very powerfull formula.

 

Regards,

Wilson