Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am building an expression for YTD for fiscal year .
The fiscal Year starts in April .
=Count({<DateNum={">=$(=num(makedate(Year(CalendarDate)),4))<=$(=num(today()))"}>} DISTINCT ENQUIRY_ID)
But somehow its returning incorrect results .
I tried debugging it .It is ignoring the first condition.
could anybody point out the issue.
Regards,
Nadeem
I can't see any evident issue with the formula, but I'd recommend to calculate the YTD and other flags in the load script, which will substantially simplify and perhaps speed up your chart expressions.
cheers,
Oleg Troyansky
www.masterssummit.com - take your QlikView skills to the next level!
Ok i think i got the issue
Try
=Count({<DateNum={">=$(=vYearStart)<=$(=vYearEnd)"}>} DISTINCT ENQUIRY_ID)
where vYearStart==Num(YearStart(today(),4))
and vYearEnd==Num(today())
Keep the DateNum format in the script to Num only
You are using DateNum and CalendarDate...are these two different dates?
Hi ,
It worked when i used a variable
=Count({<FYear=,DateNum={">=$(=vStartMonth)"}>} DISTINCT ENQUIRY_ID)
where vstartmonth=num(makedate($(=Year(today())),4))
I still did not get what the issue was with the earlier expression.
I am working on an application which was developed by someone else and i am not sure about doing all this in the load script .
Regards,
Nadeem
Nope they are not different dates
Datenum is created from Date Field by using Num(Date),
and CalendarDate field was created from Date field just by renaming Date as CalendarDate in the master calendar
Hence they are all the same.
Regards,
Nadeem
can u try this,
SUM({<DateDimensionName = {'>=$(=YearStart(Today())) <= $(=Today())'}>} MeasureName)