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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitians
Creator III
Creator III

Passing arguments in count function?

Hey,

I have following expression,

=count(DISTINCT SUBGROUP)

But i want the count for only a particular company for example COMPANY='XYZ'

please help.

Thanks.

1 Solution

Accepted Solutions
AbhijitBansode
Specialist
Specialist

=count({<COMPANY={'XYZ'}>}DISTINCT SUBGROUP)

View solution in original post

3 Replies
AbhijitBansode
Specialist
Specialist

=count({<COMPANY={'XYZ'}>}DISTINCT SUBGROUP)

sujeetsingh
Master III
Master III

Abhi , has given you the best way to do this. On the other hand you want the value passed to be dynamic means based on selection you can use variable as

vSelected=getfieldselected(COMPANY)

=count({<COMPANY=(=$(vSelected))>}DISTINCT SUBGROUP)

rohitians
Creator III
Creator III
Author

Hey Thanks..