Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
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
Creator
Creator

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

Use this

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Not applicable

It is not recognizing DISTINCT as a key word.