Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI guys,
i need to compare the date with the string, so I'm trying to run this code:
=num( sum( {< Current_Years={ Date( Date#( v_Year_Cur, 'YYYY')) }> } Quantity, '€ #.##0')
but this doesn't work.
I don't know why, can you help me?
Thanks
I think you need to check these links out
You are using order date which seems like a date and you are asking QlikView to interpret it as just YYYY. Is order date not understood as date by QlikView? If not, only then use Date#(). else just use Year([order date]) to extract year out of a date
v_Year_Cur looks like a number to me.... Is Current_Years field a just a Year or is it a date?
Update: If it is date, then i would suggest you to calculate year from Current_Years in the script like this:
LOAD Current_Years as Date,
Year(Current_Years) as Year
....
FROM ....;
and then this
=Num(Sum({<Year={$(=v_Year_Cur)}>} Quantity), '€ #.##0')
I made a mistake, v_Year_Cur is a number not a string.
I create Current_Years in this way
LOAD Year(Date#([order date], 'YYYY')) as Current_Years,
...............
FROM......;
while I set v_Year_Cur is manually
I think you need to check these links out
You are using order date which seems like a date and you are asking QlikView to interpret it as just YYYY. Is order date not understood as date by QlikView? If not, only then use Date#(). else just use Year([order date]) to extract year out of a date
Thank you