Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I'm trying to replicate the following logical rule in QlikView using Set Analysis:
(appointments where the starting planned date is less than the current report date
AND appointments where the created date is less than the current report date)
AND
(appointments where the actual starting is greater than the current report date
OR appointment is planned)
Essentially the SQL statement looks like (assuming the report date is 2013-06-30):
WHERE [Planned_Appointment_Start_Date] < '2013-06-30'
AND [Appointment_Created_Date] < '2013-06-30'
AND ([Appointment_Start_Date] > '2013-06-30'
OR [Is_Planned_Appointment] = 1)
Can anyone please assist?
Thanks in advanced.
Thanks for you input guys, but the correct set analysis in the end was:
{<Planned_Appointment_Start_Date = {"<'2013-06-30'"},
Appointment_Created_Date = {"<'2013-06-30'"},
Appointment_Start_Date = {">'2013-06-30'"}>
+ <Appointment_Created_Date = {"<'2013-06-30'"},
Planned_Appointment_Start_Date = {"<'2013-06-30'"},
Is_Planned_Appointment = {1}>}
Because the Planned_Appointment_Start_Date and Appointment_Created_Date are outside the or bracket, they must be applied to both.
Thanks again for the input.
See the attached file
Hi
Something like this:
{<Planned_Appointment_Start_Date = {"<'2013-06-30'"},
Appointment_Created_Date = {"<'2013-06-30'"},
Appointment_Start_Date = {">'2013-06-30'"}>
+ <Is_Planned_Appointment = {1}>}
Jonathan
Thanks for you input guys, but the correct set analysis in the end was:
{<Planned_Appointment_Start_Date = {"<'2013-06-30'"},
Appointment_Created_Date = {"<'2013-06-30'"},
Appointment_Start_Date = {">'2013-06-30'"}>
+ <Appointment_Created_Date = {"<'2013-06-30'"},
Planned_Appointment_Start_Date = {"<'2013-06-30'"},
Is_Planned_Appointment = {1}>}
Because the Planned_Appointment_Start_Date and Appointment_Created_Date are outside the or bracket, they must be applied to both.
Thanks again for the input.