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: 
brandon_d
Contributor III
Contributor III

Set Analysis in Load Script

There are many different types of patient visits that our healthcare organization has, but they are not defined within our source system. Therefore, within my layer 2 I created flags to use within set analysis to perform a count on these types. However, we want to also be able to define these types so they can be utilized in a filter like a standard dimension.  

In short, how do I take these two formulas and make it a field name of Visit Type with potential values of Work Comp or Urgent Care Visit?

Work Comp expression: Count({<WCFlag={1},ESPFlag={0}> + <OccMedFacilityFlag={1},ESPFlag={0}>}distinct EncounterID)

Urgent Care Visit expression: Count({<WCFlag={0}, ESPFlag={0}, IEFlag = {1}>}distinct(EncounterID))

1 Reply
y_grynechko
Creator III
Creator III

Hey,

you can use if for that:

if(WCFlag = '1' and ESPFlag = '0' and IEFlag  = '1' , 'Urgent Care Visit'

if(........................................., 'Work Comp ', null())) as [Visit Type]