Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis & and command

Hello/Hola/Namaste/Dia Dhuit,

I wish to have a set analysis expression which has the and command where the field admission is between the two variables. After some searching, I have come up with the following but with no success. The results appear to not be filtered by the first variable.

Count({< caretype={'N'},admission = {">=$(=date((vMondayofLastWeek)))"} > + < admission = {"<=$(=date((vSundayofLastWeek)))"}, referredby = {'101021889','101030294'}  >} distinct rescare_Id)    

Any ideas?

Dank u,

Matt

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can use like this,

Count({< caretype={'N'},admission = {">=$(=date((vMondayofLastWeek)))<=$(=date((vSundayofLastWeek)))"},  referredby = {'101021889','101030294'}  >} distinct rescare_Id)

Or

Count({< caretype={'N'},admission = {"admission >=$(=date((vMondayofLastWeek))) And admission <=$(=date((vSundayofLastWeek)))"},  referredby = {'101021889','101030294'}  >} distinct rescare_Id)

Celambarasan

View solution in original post

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can use like this,

Count({< caretype={'N'},admission = {">=$(=date((vMondayofLastWeek)))<=$(=date((vSundayofLastWeek)))"},  referredby = {'101021889','101030294'}  >} distinct rescare_Id)

Or

Count({< caretype={'N'},admission = {"admission >=$(=date((vMondayofLastWeek))) And admission <=$(=date((vSundayofLastWeek)))"},  referredby = {'101021889','101030294'}  >} distinct rescare_Id)

Celambarasan

stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

Combine the two expressions in one set.  I haven't syntax checked this but it would look like this:

Count({< caretype={'N'}, admission = {">=$(=date((vMondayofLastWeek)))<=$(=date((vSundayofLastWeek)))"},  referredby = {'101021889','101030294'}  >} distinct rescare_Id)

Regards,

Stephen

Not applicable
Author

Thanks Celambarasan and Stephen. Easier solution than I thought!