Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Getting field not found error even though it is on the line above?
"Field not found - <Group Code>"
All from the first tab:
asi:
LOAD
COMPANY,
S_ID,
NAME_VALUE AS [Group Code],
DESCRIPTION AS [Group Name]
FROM
(qvd);
Details:
load
date(MakeDate(Year,Period,1),'MMM-YY') as Month,
if([Group Code]=[Berth code],[Group Name],'Missing') as [Man acc group],
*;
LOAD *,
if ([Source] = 'ACCRUALS', 'Accruals','Invoices') as [Inv or acc],
if ([Source] = 'ACCRUALS' and IsNull([Product Description Temp]), 'Accruals',[Product Description Temp]) as [Product Description],
left([Year period],4) as Year,
right([Year period],2) as [Period]
;
LOAD
SalesInvAndAccruals.CUSTOMER_ID as [Customer ID],
SalesInvAndAccruals.CUST_NAME as [Customer name],
SalesInvAndAccruals.YEAR_PERIOD_KEY as [Year period],
date(SalesInvAndAccruals.VOUCHER_DATE,'DD-MMM-YY') as [Invoice Date],
SalesInvAndAccruals.COST_CENTRE as [Berth code],
SalesInvAndAccruals.CC_DESC as [Berth name],
SalesInvAndAccruals.PRODUCT as [Product Code],
SalesInvAndAccruals.PROD_DESC as [Product Description Temp],
SalesInvAndAccruals.QUANTITY as [Quantity],
SalesInvAndAccruals.NET_AMOUNT as [Value],
SalesInvAndAccruals.SOURCE as [Source],
dual(date(makedate(year(date(SalesInvAndAccruals.VOUCHER_DATE,'DD-MMM-YY')),num(month(date(SalesInvAndAccruals.VOUCHER_DATE,'DD-MMM-YY')))),'MMM-yyyy'),
year(date(SalesInvAndAccruals.VOUCHER_DATE,'DD-MMM-YY')) * 100 + num(month(date(SalesInvAndAccruals.VOUCHER_DATE,'DD-MMM-YY')))) as PayMonthYear
FROM
[C:\Users\test\Desktop\qvd\SalesInvAndAccruals.qvd]
(qvd)
where SalesInvAndAccruals.ACCOUNT = '3300'
and SalesInvAndAccruals.YEAR_PERIOD_KEY > '201310'
and SubStringCount(upper(SalesInvAndAccruals.OBJ_DESC),'JETTY DUES') =0
and not(Match(SalesInvAndAccruals.COST_CENTRE,'402','403')) ;
DROP Fields [Source],[Product Description Temp];
Hi
Try like this
asi:
LOAD
COMPANY,
S_ID,
NAME_VALUE AS [Group Code],
DESCRIPTION AS [Group Name]
FROM
(qvd);
MappingGroupName:
Mapping LOAD [Group Code],
[Group Name]
Resident asi;
Details:
load
date(MakeDate(Year,Period,1),'MMM-YY') as Month,
Applymap('MappingGroupName', [Berth code],'Missing') as [Man acc group],
*;
Load * your remaining script;
Hope it helps
Hi
You need to join / mapping Details and asi table to bring the Group Code in Details table before use that field.
Could you provide the full script or sample file to achieve your requirement
Details:
load
date(MakeDate(Year,Period,1),'MMM-YY') as Month,
if([Group Code]=[Berth code],[Group Name],'Missing') as [Man acc group],
*;
If that's the entire load statement then you're missing a FROM xxx or Resident xxxx. You're not telling Qlikview where to load the data from.
in the Details load you miss a source (can be a resident table, a qvd, an excel, a database, a preceding load)
And this source should have all the fields you are referencing
- Year
- Period
- [Group Code]
- [Berth code]
- [Group Name]
Details:
load
date(MakeDate(Year,Period,1),'MMM-YY') as Month,
if([Group Code]=[Berth code],[Group Name],'Missing') as [Man acc group],
*; // from???? resident ???
If(Match([Group Code], [Berth code],[Group Name],'Missing',) as [man acc group]
"Details:
load
date(MakeDate(Year,Period,1),'MMM-YY') as Month,
if([Group Code]=[Berth code],[Group Name],'Missing') as [Man acc group],
*;"
It´s supposed to have something below this, would you mind sharing ?
full script added
full script added
full script added
full script added