# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

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

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"?

Regards,

Tags (3)
1 Solution

Accepted Solutions
Not applicable

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

Hi Lars,

here you go:

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

Good luck!

Rainer

3 Replies
Not applicable

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

Hi Lars,

here you go:

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

Good luck!

Rainer

Not applicable

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

Hi Rainer

Thanks - it works beautifully!

I just love Set Analysis.

Lars

Not applicable

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

Thanks of lot!... Really worked great!

I love set analysis too!