Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys:
Could someone please advise me how to limit the load data into Qlikview?
For Example: I would only like to load all the data for Year 2011 and not those data that as from Year 2007 to 2011.
The database starts from 2007 to 2011.
Thank you guys.
Hi,
Try this,
tbinventorytrans:
Load InventoryKey1,
InventoryDate,
Year(InventoryDate) as Inventoryyear1,
Year (InventoryDate) as year, //=====Checking
num(month(InventoryDate)) as month,//==== Checking
num(Month(InventoryDate),'00') as Inventorymonth1,
Year(InventoryDate) & num(Month(InventoryDate)) as InventoryYearMonth1,
Day(InventoryDate) as Inventoryday1,
date(daystart(InventoryDate),'DD-MM-YYYY') as InventoryDate1,
InventoryStatus,
InventoryGoodqty,
InventoryBadqty,
InventoryQcqty,
prodid,
custacc,
invtype,
locid
FROM
Regards,
Kaushik Solanki
Hi,
Check thename of your date field and put that in "WHERE" clause
-Jai
Hi,
You need to put some think like this
Load InventoryKey1,
InventoryDate,
Year(InventoryDate) as Inventoryyear1,
Year(InventoryDate) as year, //=====Checking
num(month(InventoryDate)) as month,//==== Checking
num(Month(InventoryDate),'00') as Inventorymonth1,
Year(InventoryDate) & num(Month(InventoryDate)) as InventoryYearMonth1,
Day(InventoryDate) as Inventoryday1,
date(daystart(InventoryDate),'DD-MM-YYYY') as InventoryDate1,
InventoryStatus,
InventoryGoodqty,
InventoryBadqty,
InventoryQcqty,
prodid,
custacc,
invtype,
locid
FROM
Where Year(Today()) >=[Inventoryyear1];
Regards,
Anand
Hi:
Where Year(Today()) >=[Inventoryyear1]; NO!!!
WHERE year(InventoryDate) = year(today());
1º It must be the original field InventoryDate
2º The field InventoryDate must have a date format in order to extract the year correctly.
3º Even when it should be the same, I place the field first, then equal sign, then the variable, criteria, etc.
Ok.
Hi,
You need to put some think like this
Load InventoryKey1,
InventoryDate,
Year(InventoryDate) as Inventoryyear1,
Year(InventoryDate) as year, //=====Checking
num(month(InventoryDate)) as month,//==== Checking
num(Month(InventoryDate),'00') as Inventorymonth1,
Year(InventoryDate) & num(Month(InventoryDate)) as InventoryYearMonth1,
Day(InventoryDate) as Inventoryday1,
date(daystart(InventoryDate),'DD-MM-YYYY') as InventoryDate1,
InventoryStatus,
InventoryGoodqty,
InventoryBadqty,
InventoryQcqty,
prodid,
custacc,
invtype,
locid
FROM
Where [Inventoryyear1] >= Year(Today());
It works or not if not let me know
Regards,
Anand
Yep, you need to check your syntax
tbinventorytrans:
Load InventoryKey1,
InventoryDate,
Year(InventoryDate) as Inventoryyear1,
Year (InventoryDate) as year, //=====Checking
num(month(InventoryDate)) as month,//==== Checking
num(Month(InventoryDate),'00') as Inventorymonth1,
Year(InventoryDate) & num(Month(InventoryDate)) as InventoryYearMonth1,
Day(InventoryDate) as Inventoryday1,
date(daystart(InventoryDate),'DD-MM-YYYY') as InventoryDate1,
InventoryStatus,
InventoryGoodqty,
InventoryBadqty,
InventoryQcqty,
prodid,
custacc,
invtype,
locid
FROM
(qvd); where Year(InventoryDate) = Year(Today());
Hope that makes sense.
BI Consultant