Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Unexpected behaviour with date range in set analysis

Hi I'm using QlikView 11.20 SR 12 and have a strange behaviour with date ranges in set analysis

i have the following set expression:


{$<date={'>=$(=MonthStart(vEndDate))<=$(vEndDate)'}>}


It seems that QlikView is ignoring the <= and behave like it is only a < . Does anybody know, why?

My workaround for this behaviour is $<date={'>=$(=MonthStart(vEndDate))<=$(=Date(vEndDate+1))'}>} , so the correct date range is shown.

Thank you for your help!

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I'm guessing that your variable vEndDate is a pure date without a time fraction, i.e. 2015-07-31 00:00:00, and the 'dates' you want to see do have time fractions. Those 'dates' will be larger than the start of the day 2015-07-31.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

It seems that QlikView is ignoring the <= and behave like it is only a < . Does anybody know, why?

I doubt that. What does your variable vEndDate contain? How is that value created?


talk is cheap, supply exceeds demand
Not applicable
Author

vEndDate is created and filled with a Slider/Calendar Object.  Min Value is undefined, Max Value is = Max({1} date).

Date is generated with the Master Calendar Script.

When i print the expression in a Text Object it looks like >=2015-07-01<=2015-07-31.

When i use it in a straigth table with date as dimension i get dates from 2015-07-01 till 2015-07-30 and not till 2015-07-31.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I'm guessing that your variable vEndDate is a pure date without a time fraction, i.e. 2015-07-31 00:00:00, and the 'dates' you want to see do have time fractions. Those 'dates' will be larger than the start of the day 2015-07-31.


talk is cheap, supply exceeds demand
Not applicable
Author

That was the solution for the problem. Some of the data which i thougt, that where pure dates, had a timestamp. Thank you for your help.