Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
andnichols
Contributor II
Contributor II

Selecting specific year in set expression

Hi, 

I am trying to filter this data to just the year 2022, but the field "DepartEDDateTime" is a timestamp and I can't seem to get it to work in the if statement. Appreciate any help!

 

(count(if((DepartEDDateTime - LastReadyToAdmitDateTime)*1440 <=60 and [PatientClassName]= 'Observation' and year([DepartEDDateTime] = '2022'),[EncounterID]))

Labels (1)
1 Solution

Accepted Solutions
edwin
Master II
Master II

an easier way would be to add a YEAR column in your data model.  where you define or load the field  DepartEDDateTime, just add a new field defined by year(DepartEDDateTime) as your yearfield

this way in your expression or et analysis, you jut qualify your yearfield equal something

View solution in original post

3 Replies
edwin
Master II
Master II

an easier way would be to add a YEAR column in your data model.  where you define or load the field  DepartEDDateTime, just add a new field defined by year(DepartEDDateTime) as your yearfield

this way in your expression or et analysis, you jut qualify your yearfield equal something

andnichols
Contributor II
Contributor II
Author

That worked - thank you so much!

edwin
Master II
Master II

yw