Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlikview och having a little problem with set analysis using "Date" that I would love to have help from any of you.
I would like to compare today's result with yesterday's, that of 5 days ago or 10 days ago etc..
What I have done so far, which apparently does't work is:
In script:
SET v1DayAgo= DATE(MAX(Date)-1)
SET v5DaysAgo= DATE(MAX(Date)-1)
In textbox:
=SUM(|$<Date=|$(v1DayAgo)|>Result)
=SUM(|$<Date=|$(v5DaysAgo)|>Result)
I don't get any error when entering the expression, but what I get out of these is "-"..
Does anyone have any idea what I have done wrong?
Thank you for help in advance!
Regards,
Ayako
Not sure why you have pipes, but the expression should be:
=Sum({$<Date={"$(=$(v1DayAgo))"}>Result)
=Sum({$<Date={"$(=$(v5DaysAgo))"}>Result)
Not sure why you have pipes, but the expression should be:
=Sum({$<Date={"$(=$(v1DayAgo))"}>Result)
=Sum({$<Date={"$(=$(v5DaysAgo))"}>Result)
If this doesn't work then check if you get a 1 day ago date in a text box when you add this -> =$(v1DayAgo). If it doesn't you might need to add =$(=v1DayAgo) and make the same change in the two expressions provided above. Also make sure you get the result in the same format as DateField you have.
Wow it worked! Thank you so much, Sunny T!
The reason why I had pipes is that I posted my quesiton from mac and didn't know where I could find these "{ }"..
Have a great weekend!
Awesome , I am glad it worked. I would request you to close this thread if you got what you were looking for.
Best,
Sunny