Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Partner
Partner

Max Date based on a filter date

Dear Experts,

I have a column with dates. There is a separate date filter. I want to show Max Date from dates column based on the date selected in the filter.

If the user select 31-DEC-2017 then it restrict the dates till 31-DEC-2017 and show the maximum date from first day till 31-Dec-2017.

If the user select 30-NOV-2017 then it restrict the dates till 30-NOV-2017 and show the maximum date from first day till 30-NOV-2017.


Suppose Date is in vDate and dates column is plan_start_date.


Regards,


Zahid Rahim

Tags (1)
4 Replies
Partner
Partner

Re: Max Date based on a filter date

if the user select 30-NOV-2017; the max date will also be 30-NOV-2017.

The condition is way simpler than "restricting the dates from the start to the 30-NOV-2017.. since the max date is in fact 30-NOV-2017)

No?

Maybe I've missed understood some things



I've in fact misread.. there is 2 seperate date fields

pradosh_thakur
Honored Contributor II

Re: Max Date based on a filter date

edited

max({<plan_start_date={"<=$(=max(Date))"}>}plan_start_date)


Learning never stops.
Partner
Partner

Re: Max Date based on a filter date

Pradosh;

it's double quotes and not quotes (please refer to this Quotes in Set Analysis )+ u've ommited the $(=urMeasure)

max({<plan_start_date={"<=$(=max(Date))"}>}plan_start_date)



pradosh_thakur
Honored Contributor II

Re: Max Date based on a filter date

Hi Omar

Thanks for the correction. I have edited that now. Must be an off day for me and wrote the expression in a hurry. Generally i am the one who ask people to refer the same document.

Thanks

Pradosh

Learning never stops.