Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Reference the very good blog post here:
http://qlikviewcookbook.com/2015/05/better-calendar-scripts/
I was testing the initial part of the load and getting a result I dont understand.
This is what I am loading:
LOAD
min(fieldvalue('Order Header Invoice Date',recno()))-1 as mindate
,max(fieldvalue('Order Header Invoice Date',recno())) as maxdate
AUTOGENERATE
fieldvaluecount('Order Header Invoice Date')
;
Of the 591 distinct dates in the 'Order Header Invoice Date' it returns mindate as one less than the first date in the 'Order Header Invoice Date' which is correct; however the maxdate value is simply '?'
Is this monday morning stupidity (again) or has something gone wrong or been lost in translation
Thanks
Oli
try to apply Num or Date function
num(min(fieldvalue('Order Header Invoice Date',recno()))-1) as mindate
,num(max(fieldvalue('Order Header Invoice Date',recno()))) as maxdate
try to apply Num or Date function
num(min(fieldvalue('Order Header Invoice Date',recno()))-1) as mindate
,num(max(fieldvalue('Order Header Invoice Date',recno()))) as maxdate
It's not a monday morning stupidity. It's something can happen with formatted dates. You could try adding a num around it: ,num(max(fieldvalue('Order Header Invoice Date',recno()))) as maxdate
Thank you both of you. I have just started to become smarter to the date related 'gotchas'. I can now add this one to that list.
apologies gwassenaar that I cant mark more than one correct answer and as kush141087 piped you to post I have marked your anwser as helpful. Cheers anyway