Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to creat a variable and then later would like to call it later like below:
LOAD
MonthName(‘9/1/2018’) as [Sample Month]
;
LOAD
....
....
[Open Date],
....
if(year([Open Date] )= year ([Sample Month]), ‘Yes’, ‘No’) as [V1]
From
[folder path]
but error says sample month is not found. How do I fix this
Hello!
Peek() function is exactly what you should use in such cases:
Also I've attached a little example for you.
Hi Haika,
You can try like this also:
LOAD
*,
if(year([Open Date] )= year ([Sample Month]), ‘Yes’, ‘No’) as [V1] ;
LOAD
MonthName(‘9/1/2018’) as [Sample Month],
....
[Open Date],
....
From
[folder path]
Br,
KC
Hello,
your if expression is not working because you are using it in the Load while the field [Sample Month] is created in the PreLoad.
the order is this: Load -> Preload and just follow KC example.
Hope it helps,
Andrei