Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm a very new QV user and I'm trying to build a very simple load script which has to flag the first occurrence of a value in a given field, let's say the Customer_ID one.
Looking at some of the posted thread about the exists function, I tried something like this:
LOAD @1 as F_Customer_ID,
if (Exists (@1), 'NO', 'YES') as First_Fruition_FLG,
@3 as FruitionTimeStamp,
MakeDate (Left(@3, 4), Mid(@3,5,2), Mid(@3,7,2)) as FruitionDate,
WeekName(MakeDate (Left(@3, 4), Mid(@3,5,2), Mid(@3,7,2))) as FruitionWeek,
MonthName(MakeDate (Left(@3, 4), Mid(@3,5,2), Mid(@3,7,2))) as FruitionMonth
FROM <xls file path and name>
and what I got is that it seems that tool isn't able to find out any value.
The First_Fruition_FLG column has always the YES value.
Any help?
Thanks a lot, Luigi.
You are renaming the @1 field, so I think that's the issue QV can't find any existing values - the field does not exist in the data model.
Try the 2 argument version of exists:
if (Exists (F_Customer_ID, @1), 'NO', 'YES') as First_Fruition_FLG,
Hi
Try like this
if(Previous(@1) = @1,'Yes','No') as First_Fruition_FLG,
Hope that helps
You are renaming the @1 field, so I think that's the issue QV can't find any existing values - the field does not exist in the data model.
Try the 2 argument version of exists:
if (Exists (F_Customer_ID, @1), 'NO', 'YES') as First_Fruition_FLG,
Thanks a lot, your tip was successful.
Best regards, Luigi.