Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date range in Set Analysis

Hi All,

I have here a table:

dayendstart.png

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!

15 Replies
anbu1984
Master III
Master III

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

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

Not applicable
Author

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

anbu1984
Master III
Master III

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

Not applicable
Author

It is calculated. Report Date - 6 days

jyothish8807
Master II
Master II

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
ashfaq_haseeb
Champion III
Champion III

Then try like this

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

Regards

ASHFAQ

Not applicable
Author

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
Author

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

PrashantSangle

Hi,

then try your expression with if clause

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂