# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

## Date range in Set Analysis

Hi All,

I have here a table:

I need to create an analysis, what is the total Qty of the Report Date with the specific date range.

ex: For Report date 20-Sep-14, the range is >=14-SEp-14<=20-Sep-14

How can I include this in my set analysis?

Thanks!

Tags (3)
15 Replies
Honored Contributor III

## Re: Date range in Set Analysis

=Sum({<Report_Date={'>=\$(=Max(DayStart)<=\$(=Max(DayEnd)'}>}Qty)

Make sure Report_Date and Max(DayStart) are in same format

Not applicable

## Re: Date range in Set Analysis

yes, but that will only get the maximum dayend and daystart. i need to get per row

Honored Contributor III

## Re: Date range in Set Analysis

Do you have that range in a variable or you calculate it?

Not applicable

## Re: Date range in Set Analysis

It is calculated. Report Date - 6 days

Honored Contributor II

## Re: Date range in Set Analysis

Hi Lyn,

Do have a field which have Dtae=14 Sep 2014 and a Quentity associated with it?

Over gere i guess max(start date) is a calculated field.

Regards

KC

Best Regards,
KC

## Re: Date range in Set Analysis

Then try like this

=Sum({<Report_Date={'>=\$(=date(Max(DayStart)-6))<=\$(=Max(DayEnd))'}>}Qty)

Regards

ASHFAQ

Not applicable

## Re: Date range in Set Analysis

Hi, Report date is associated with the Qty. Yes, for example I have to find the quantity between the dates given above.

If report date is 20-Sep-14 then the date range should be from what is above.

Not applicable

## Re: Date range in Set Analysis

Hi doing this will only take the maximum of all..

so max(daystart) will not compute per row but will compute the total.. so max(daystart) in that set analysis will output = 19-sep-14

## Re: Date range in Set Analysis

Hi,

then try your expression with if clause

Regards

Great dreamer's dreams never fulfilled, they are always transcended.