Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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!