# New to QlikView

Discussion board where members can get started with QlikView.

Announcements

#### Breathe easy -- you now have more time to plan your next steps with Qlik! QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information. Not applicable

## Rolling date range in set analysis expression

I am trying to create a set analysis expression that will select transactions that have date from today to three days ago. This is the expressionL

(Sum ({<nDate = {"\$((>=num(today())-1))"}>}[Actual Input Qty]))-(Sum ({<nDate = {"\$((>=num(today())-1))"}>}[Std Input Qty]))

This expression returns zero for all instances.  I would appreciate any help you can provide.

1 Solution

Accepted Solutions Not applicable

## Re: Rolling date range in set analysis expression

I ended up using the following after creating YearDay using the DayNumberOfYear expression in the load script:

= sum({<"YearDay" = {">=\$(=max(YearDay)-4)<=\$(=max(YearDay))"}>}[Actual Input Qty] - [Std Input Qty])

Thanks to those who responded.

3 Replies Not applicable

## Re: Rolling date range in set analysis expression

Hi,

Try to get Day from NDate then using this expression:

sum({<Day= {">=\$(=max(Day)-3)<=\$(=max(Day))"} >} [Actual Input Qty]-[Std Input Qty])

- Heri MVP

## Re: Rolling date range in set analysis expression

Hi

Try this,

= sum({<nDate = {">= \$( = max (nDate) - 3) <= \$(= max(nDate) )"}>}[Actual Input Qty] - [Std Input Qty])

hope it helps Not applicable

## Re: Rolling date range in set analysis expression

I ended up using the following after creating YearDay using the DayNumberOfYear expression in the load script:

= sum({<"YearDay" = {">=\$(=max(YearDay)-4)<=\$(=max(YearDay))"}>}[Actual Input Qty] - [Std Input Qty])

Thanks to those who responded.

Community Browser