Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can Some one help me how to filter Last 6 months data from current Date in Qlikview Load Script.
Example
Today Date is 5\15\2017 so it should go last 6 months date 11\15\2016. so results should give me from 11\15\2016 to till date.
How can i give in Qlikview load script of where condition.
Best Regards,
Hk
This might help:
Load *
From
Where Date >= AddMonth(Today(), -6)
;
sum({<[Ship Date]={'>=$(=addmonths(today(),-6))<=$(=today())'}>}Sales) ---Set analysis
let vfirstdate= today()
let venddate= addmonth(today(),-6)
calendar:
load date(vfisrtdate+iterno()-1) as Date
autogenerate 1
while $(venddate)<=$(vfirstdate);
add this to calendar
Read this post
vLastMonth= "=Date(Max(Month),'MMM-YY')";
v2ndLastMonth= "=Date(AddMonths(Max(Month),-1),'MMM-YY')";
vLast6Month= =Date(AddMonths(Max(Month),-5),'MMM-YY')
Hi HariKiran !
Use this:
Load *
From XYZ
Where Date >= AddMonth(Today(), -6);
In case you are willing to have a flag only. In the Calendar table add this:
Calendar:
Load *
,If(Date >= AddMonth(Today(), -6), 1, 0) as 6LastMonths
From
;
Hi Bacius,
Thank You that Helps For now. 🙂
Sorry for delay in Responding.
Best Regards,
Hari
Plz find the attached file.You can change the expression as for your requirement.
For now m showing it for previous 6 months data.