Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis using "Date"

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

1 Solution

Accepted Solutions
sunny_talwar

Not sure why you have pipes, but the expression should be:

=Sum({$<Date={"$(=$(v1DayAgo))"}>Result)

=Sum({$<Date={"$(=$(v5DaysAgo))"}>Result)

View solution in original post

4 Replies
sunny_talwar

Not sure why you have pipes, but the expression should be:

=Sum({$<Date={"$(=$(v1DayAgo))"}>Result)

=Sum({$<Date={"$(=$(v5DaysAgo))"}>Result)

View solution in original post

sunny_talwar

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.

Not applicable
Author

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!

sunny_talwar

Awesome , I am glad it worked. I would request you to close this thread if you got what you were looking for.

Best,

Sunny