Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers,
I would like to find the max/min date of my selection for this I used:
(GetFieldSelections(Extract_Date,',',100))
The result is:
29/05/2018,30/05/2018,31/05/2018,01/06/2018,04/06/2018,16/05/2018,17/05/2018,18/05/2018,22/05/2018,23/05/2018,24/05/2018,25/05/2018,28/05/2018
The dates in Bold are the one in green selection.
the other date are in dark grey but selected (check mark next to the value)
The value I want to find is 04/06/2018 for max and for min 16/05/2018. How can I do?
Best regards
Hi,
I found a way by using this for Max:
=if(date(right(GetFieldSelections(Extract_Date,',',200),10))>
date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date))),
date(right(GetFieldSelections(Extract_Date,',',200),10)),
date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date))))
and for Min:
=if(IsNull(date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date)+1))),
date(left(GetFieldSelections(Extract_Date,',',200),10)),
if(date(left(GetFieldSelections(Extract_Date,',',200),10))<
date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date)+1)),
date(left(GetFieldSelections(Extract_Date,',',200),10)),
date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date)+1))))
this way I managed to find in my list of date the one I need
29/05/2018,30/05/2018,31/05/2018,01/06/2018,04/06/2018 (max),16/05/2018 (min),17/05/2018,18/05/2018
I know it's very clean but it works !
try this way
=sum({<Date = {'>=$(=vMin)<=$(=vMax)'}>}Sales)
where vMin = Min(Date)
vMax = Max(Date)
Hi,
Why don't you use Max(Extract_date) for Max
and
Min(Extract_date) for Min?
Thanks,
RT
because I really need the min and max dates of my selected dates, not the on in my selection.
For exemple:
the min for my selected dates is : 16/05/2018
the min for my selection is : 29/05/2018 (Min(Extract_date))
What I need is the min of my selected date: 16/05/2018 (see check mark in my screenshot)
BR
vMin = Min(Date) . but this is what I want to find, the vMin. But Min(Date) will not return value 16/05/2018 as it is out of my selection.
Hi,
Min(Extract_date) will return min of the selected date. Isn't it something that you want?
Thanks,
RT
My expression will work
but you need to select the date range
then it will show between the selected range dates
is this you want?
Hi,
I found a way by using this for Max:
=if(date(right(GetFieldSelections(Extract_Date,',',200),10))>
date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date))),
date(right(GetFieldSelections(Extract_Date,',',200),10)),
date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date))))
and for Min:
=if(IsNull(date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date)+1))),
date(left(GetFieldSelections(Extract_Date,',',200),10)),
if(date(left(GetFieldSelections(Extract_Date,',',200),10))<
date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date)+1)),
date(left(GetFieldSelections(Extract_Date,',',200),10)),
date(SubField(GetFieldSelections(Extract_Date,',',200),',',GetSelectedCount(Extract_Date)+1))))
this way I managed to find in my list of date the one I need
29/05/2018,30/05/2018,31/05/2018,01/06/2018,04/06/2018 (max),16/05/2018 (min),17/05/2018,18/05/2018
I know it's very clean but it works !