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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Saugandh
Contributor
Contributor

case when with aggregation

Hi, 

 

i was wondering if someone would be able to help me . I want to create the following Case statement in Qliksense.

emp_id ,

"case when a.START_DT BETWEEN '08NOV2019'D AND '15NOV2019'D and a.apo_ID <> '' then 1 else 0 end as nov_08_15chk_appointments,"

 

basically there  is no record for appointment(no Apo_id)  for some employee on some particular date that i can find through above query in sas and then i have to aggregate the employee level info on region wise, i tried the below script but i am not getting the correct output. 

if (START_DT >= '($vWeek_S1)' and START_DT <= '($vchk2)' and ACTV_ID <>'', 1,0) as week1%,
// if (START_DT >= '($vWeek_S2)' and START_DT <= '($vchk3)' and ACTV_ID <>'', 1,0 ) as week2%

 

many thanks 

saugandh

 

 

Labels (2)
1 Reply
JGMDataAnalysis
Creator III
Creator III

I don't know the content of the variables, but the dollar sign is not well positioned.

For example: '($vWeek_S1)' '$(vWeek_S1)'