Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple conditions in expression

In a text object, I am trying to display a distinct number of folders of a certain type.

in SQL it would be written as

SELECT DISTINCT (COUNT(FOLDERRSN)),

FOLDERTYPE

FROM folder f

WHERE f.foldertype = 'RC'.

What I have entered as expression is

Num((Sum(FOLDERTYPE='RC')*-1),'#,##0', ',')

Some of these records repeat a few times which is fine as there are multiple inspections done - as shown in the attachment

I want to count each folderrsn once even if it has multiple inspections.

NOTE - Folderrsn is a unique key, RC is foldertype, and Inspection is the type of inspection it went through.

3 Replies
craigsutton
Creator
Creator

=Count({<FOLDERTYPE='RC'>} DISTINCT FOLDERRSN)

Anil_Babu_Samineni

Use this

Count({<FOLDERTYPE = {'$(=WildMatch(FolderType,'*RC*'))'}>} FOLDERRSN)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

It is not recognizing DISTINCT as a key word.