Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
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

Tags (2)
1 Solution

Accepted Solutions

Re: Set Analysis using "Date"

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

Re: Set Analysis using "Date"

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

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

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

View solution in original post

Re: Set Analysis using "Date"

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

Re: Set Analysis using "Date"

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!

Re: Set Analysis using "Date"

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

Best,

Sunny