Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Arbitrary Range Sum with Set Analysis (Easy YTD calc.)

Hi QlikHeads!

How can you use a field value (e.g. week) instead of a fixed value in the Set Analysis expression for summing over an interval?

Pls. see enclosed example: Imagine that we have 5 weeks associated with values. When I select a week(or range) I want my set analysis to make a sum of all values from W0 -> max(week).

In the example it works with a fixed value (e.g. '4') but how can I use the Field "Week"?

error loading image

Regards,

Lars Madsen

1 Solution

Accepted Solutions
Not applicable
Author

Hi Lars,

here you go:

sum( {$<Week = {">=$(=Min(Week))<=$(=Max(Week))"}>} Value)

Good luck!

Rainer

View solution in original post

3 Replies
Not applicable
Author

Hi Lars,

here you go:

sum( {$<Week = {">=$(=Min(Week))<=$(=Max(Week))"}>} Value)

Good luck!

Rainer

Not applicable
Author

Hi Rainer

Thanks - it works beautifully!

I just love Set Analysis.

Lars

Not applicable
Author

Thanks of lot!... Really worked great!

I love set analysis too!