Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
My data set is looking at data from 01/04/2013 to the End of last month (Which at the the moment is: 31/07/2013)
However in the where clause I want to be able to get just the latest month's data I.e. July 2013 data
Cna someone kindly help me write the where clause where I always get the dataset for the entrity of last month. This will need to be dynamic, so I can place it on the scheduler
LOAD
'EYE_ED_TOTAL_MONTH' as data_source,
RunMonthEye,
Quarter_NumberEye,
Current_Quarter,
Current_Month,
Current_Year,
Main_WeekEye,
ATTENDANCE_CATEGORY,
CONCLUSION_DATE_TIME,
MonthYear,
Eye_Week,
FROM
C:\QLIKVIEW\DEVELOPMENT\HP\QVD\EYE_ED_MonthEnd.qvd
(qvd
)
WHERE
CONCLUSION_DATE_TIME>= DATE(MonthStart(Today())-1, 'DD/MM/YYY')
and
CONCLUSION_DATE_TIME<=dATE(MonthEnd(Today())-1, 'DD/MM/YYY')
;
CONCULSION DATE TIME comes out as a Date
RunMonthEye is a number
Current_Month is a number with July being a 4
Current_Quarter is a number with July being a 2
Can you provide any assistance please?
Thanks
Helen
See if this work as your where clause:
where MonthName(CONCLUSION_DATE_TIME)=MonthName(addmonths(Today(),-1))
See if this work as your where clause:
where MonthName(CONCLUSION_DATE_TIME)=MonthName(addmonths(Today(),-1))
Hello Abey
Amazing! Thank you, yes this works for me
You can also try this
Date(MonthStart(Today(),-1))