Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlikview and built a prototype for Expression calculation using formula SUM( if(CALC_DATE = vSelectedDate, QTY, 0))
vSelectedDate is a variable of the format 6/10/2015 12:00:00 AM
CALC_DATE is a date with values in the same format.
when I convert the expression to =sum( {<CALC_DATE={$(vSelectedDate)}>} QTY) I get zero.
Am I missing any date conversion in the statement?
How would I use the same logic but only compare the date portion without the time component?
sum(.{<date(CALC_DATE)={date($(vSelectedDate))}>} QTY) produces an expression error.
PS: I am using a Personal Edition version of Qlikview
Thanks much for your help!
My guess is that vSelectedDate contains a text value and not a date. Possibly CALC_DATE also contains text values and not dates. See this blog post for some pointers: Why don’t my dates work? And this document: QlikView Date fields
Hi,
It seems to be date issue.First convert date in number format,use like this.
Floor(NUM(CALC_DATE)) AS CALC_DATE.
Thank you Gysbert and Neelam. I was able to get to expected result using
=SUM({<CALC_DATE={"=(date(CALC_DATE)=date($(vSelectedDate)))"} >} QTY)
The Set Analysis document by FABRICE44 on Page 14 notes not to use the dimension when using in the condition statement. Seems to work for me at least for now. I am not sure how I would create a integer key KeyAutoNumber as stated in that document.