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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
samvile18
Creator III
Creator III

Set analysis issue

Hi all,

I'm trying to write some set analysis do the following:

Count all scheme numbers where the MEASURE is 'Total Members' and the VALUE is inbetween two variables input by the user, this is what I have and I can't get it to work!

=if(vMaxDate=vMaxExtract,Count(DISTINCT{<Measure={'Total Members'},Value={">=$(=Input 1)<=$(=Input 2)"}>}[Scheme No]),0)

The two max date variables just make sure I'm looking at the latest data.

Can anyone see where I'm going wrong?

4 Replies
Not applicable

Try the following:

=if(vMaxDate=vMaxExtract,Count(DISTINCT{<Measure={'Total Members'},Value={'>=$([Input 1])'}, Value={'<=$([Input 2])'}>}[Scheme No]),0)

MayilVahanan

HI

Try like this

=if(vMaxDate=vMaxExtract,Count(DISTINCT{<Measure={'Total Members'},Value={'>=$([Input 1])<=$([Input 2])'}>}[Scheme No]),0)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Clever_Anjos
Employee
Employee

You shouldn´t mix >= and <= at same SA. Use the intersection operator "*"

=if(vMaxDate=vMaxExtract,Count(DISTINCT{<Measure={'Total Members'},Value={">=$(=Input 1)"}*{"<=$(=Input 2)"}>}[Scheme No]),0)

whiteline
Master II
Master II

=if(vMaxDate=vMaxExtract,

Count(DISTINCT {<Measure={'Total Members'},Value={">=$(=[Input 1])"}>} * {<Measure={'Total Members'}, Value={"<=$(=[Input 2])"}>} [Scheme No]),0)