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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
maxsheva
Creator II
Creator II

min date from data set

Hi,

data:

LOAD *, Year(date) as year;

LOAD * Inline [

date, product, value

01.01.2016, product1, 100

01.01.2017, product1, 100

01.02.2017, product1, 100

01.03.2017, product1, 100

01.04.2017, product1, 100

];

I need to get minimum date from the data above. In set analysis I use this =Date(min({<date={'>=(=min(date))<=$(=max(date))'}>} date))

When I select from list box some date, for example "01.02.2017" the result is "01.01.2016"

When I select "2017" year the result is "01.02.2017". But I still need the min in data set.


Any idea would be appropriate.

Thx.

13 Replies
maxsheva
Creator II
Creator II
Author

would you please clarify the difference between

yours  Sum( {<date={">=$(=min({1} date))<=$(=max(date))"}, year >} value)

and this variant Sum( {<date={'>=(=min(date))<=$(=max(date))'}, year>} value)


Are these the same versions?

swuehl
MVP
MVP

Well, second expression shows incorrect syntax, but Qlik is gracious and I think it will be interpreted like the version missing the lower limit:

Sum( {<date={"<=$(=max(date))"}, year >} value)

maxsheva
Creator II
Creator II
Author

Thank you for the explanation.

ClickNorth
Contributor
Contributor

Hi, 

I have a slightly more specific problem. 

I want to sum for the max value date and min start of fiscal year date. 

Where the fiscal year start is the 6th April.

So I have a FY to date field. I want it to sum from financial year start to max value date. 

I've tried defining the start date, but I can't get it to work.