Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Set Analysis with Variable Dates and an Operation

I have the following variables:

1. vLatestWeek

2. vWeeksAgo

3. vBeginWeek

Is it possible to write in an expression using these variables to sum up all the weeks from the LatestWeek to however WeeksAgo? without having to use the BeginWeek?

To further this, both of the expression below are functional but don't give the answer I need. I believe it's a combination of the two but my syntatical permutations are not working. Any help is much appreciated! Thanks in advance!

Sum({< Weeks = {'$(=$(vmaxweek) - $(vweeksago))'} >} Sales)

Sum({<Weeks={">=$(vbeginweek)< $(vlatestweek)"}>}Sales)



1 Solution

Accepted Solutions
MVP
MVP

Set Analysis with Variable Dates and an Operation

Hard to be sure of syntax without being able to check it, plus the variable names in your two sums are inconsistent both with each other and with the variables you listed in the post. But I'm guessing this:

sum(<Weeks={">=$(=$(vlatestweek)-$(vweeksago)) <$(vlatestweek)"}>} Sales)

2 Replies
MVP
MVP

Set Analysis with Variable Dates and an Operation

Hard to be sure of syntax without being able to check it, plus the variable names in your two sums are inconsistent both with each other and with the variables you listed in the post. But I'm guessing this:

sum(<Weeks={">=$(=$(vlatestweek)-$(vweeksago)) <$(vlatestweek)"}>} Sales)

Not applicable

Set Analysis with Variable Dates and an Operation

Thank you! this worked perfectly.

Community Browser