Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am very new to Qlikview and I am comparing two different dates. In my script I set
LET vThreeDayAgo = Dayname(today()-3); so the variable ends up looking like this 09/07/2012 today.
I am comparing this in this set analysis syntax but get the sum of everything for DaysFilled.Days in the table.
The DaysFilled.Date is formatted mm/dd/yyyy. I have verified that there is a DayFilled.Date = 09/07/2012.
sum({$<DaysFilled.Date={"=vThreeDayAgo"}>} DaysFilled.Days)
Can someone tell me what is wrong with the above Set analysis?
Any ideas would be greatly appreciated.
Thank you,
OnePuttGirl
Hi,
The format in the variable and the field are not the same, therefore the zeroes in the result. Check the ammended application and see how the variable has changed and works.
Hope that helps.
Miguel
sum({$<DaysFilled.Date={"=DaysFilled.Date=$(vThreeDayAgo)"}>} DaysFilled.Days)
HI
sum({$<DaysFilled.Date={$(vThreeDayAgo)}>} DaysFilled.Days)
Edit:
sum({$<DaysFilled.Date={'$(vThreeDayAgo)'}>} DaysFilled.Days) miss qoutes..
hope it helps
Hi,
Thank you for your response. I don't know why but when I do this I get null values. And the one above this I get zeros.
Any ideas why?
Hi,
Probably it's due to the fact that Dates are represented as literals (strings) so using single quotes should work:
Sum({< DaysFilled.Date = {'$(vThreeDayAgo)'} >} DaysFilled.Days)
or event to the fact that you need to expand the variable using the equal sign and using single quotes:
Sum({< DaysFilled.Date = {'$(=vThreeDayAgo)'} >} DaysFilled.Days)
Hope that helps.
Miguel
Miguel,
I did both of the expressions and I still get zeros. Is there anything else you would try?
As my and Miguel's expressions gives you zeros,
I suggest create a table box and check to be sure that zeros is not the right answer.
How do I attach my .qvw?
Ok, I attached a qvw and the expression is for Monday. Can you tell me why I'm getting nothing?
Zeros is not the correct answer. Can you check my .qvw I attached and see if you can get the correct result?