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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
prajapatiamar38
Creator II
Creator II

Set Analysis?

Hi,
How can we write following expression in set analysis:

=Count(distinct if((CR1_Jobcardclosed_Date-CR1_Jobcard_Date))<=2,CR1_Total_Unscheduled_Jc))

Plz Help......

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Sorry, I did not notice carefully, there are two fields (and you are actually trying to calculated the difference). Try:

=Count({<CR1_Total_Unscheduled_Jc={"=CR1_Jobcardclosed_Date-CR1_Jobcard_Date<=2"}>} distinct CR1_Total_Unscheduled_Jc)

View solution in original post

11 Replies
vardhancse
Specialist III
Specialist III

Hi Try,

Count({<Distinct(CR1_Jobcardclosed_Date-CR1_Jobcard_Date)={'<2'}>}CR1_Total_Unscheduled_Jc)

amit_saini
Master III
Master III

Hi,

Try :

count({<CR1_Jobcardclosed_Date-CR1_Jobcard_Date<={'2'} >} distinct CR1_Total_Unscheduled_Jc)


Thanks,

AS

Not applicable

Hi,

Create one Field in Script ===  (CR1_Jobcardclosed_Date-CR1_Jobcard_Date) as Days_Interval

Count({<Days_Interval={"<2"}>} Distinct CR1_Total_Unscheduled_Jc)

Regards

Vimlesh

prajapatiamar38
Creator II
Creator II
Author

Hi

I tried it but it is not correct.


qlikmsg4u
Specialist
Specialist

as suggested by vimlesh20 it is better to create a new field

or something like this

=Count({<CR1_Jobcard_Date = {">$(=CR1_Jobcard_Date ) <=$(=CR1_Jobcard_Date +2)"}>} Distinct CR1_Total_Unscheduled_Jc)

prajapatiamar38
Creator II
Creator II
Author

Any other solutions rather than creating field in script as suggested by vimlesh20.

Thanks

qlikmsg4u
Specialist
Specialist

tried the above expression?

tresesco
MVP
MVP

=Count({<CR1_Jobcardclosed_Date-CR1_Jobcard_Date={'<=2'}>} distinct CR1_Total_Unscheduled_Jc)

prajapatiamar38
Creator II
Creator II
Author

HI

I Have tried but its giving an error