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: 
Not applicable

Distinct in Set Analysis

Hi guys,

I am trying to do a set analysis for a distinct month, could you help me sort it?

=if(Headcount<>Null(), count({<Month={'Jan'}>}distinct Employee))

Thanks,

Anna

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

May be

Count({<Month={'Jan'}, Headcount = {*}>}Distinct Employee))

View solution in original post

4 Replies
MK_QSL
MVP
MVP

May be

Count({<Month={'Jan'}, Headcount = {*}>}Distinct Employee))

PrashantSangle

Hi,

Try this,

create flag in your script.

Like

if(isnull(Headcount),'false','true') as Headcount_Flag;

Then use set analysis

like this,

count({<Month={"Jan"},Headcount_Flag={'true'}>} Distinct Employee)

regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
its_anandrjs
Champion III
Champion III

Try like

=count({<Month={"Jan"},Headcount = {'$(=len(Headcount)<>0)' }>} Distinct Employee)

Or

=count({<Month={"Jan"},Headcount = {*} >} Distinct Employee)

Not applicable
Author

Thank you!