Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

brijeshma
Contributor

How to Get Max Date Selected on check box selection

Hi ,

I have one simple Requirement. But any how i am not able to do. kinldy Help me to resolve this.

I want to Put One Check Box On Screen.. so If Cust Select Today it get select to Max(Date) and

if Yesterday so Max(Date)-1. and Dashboad will show data based on the selection ..

Today.png

I am Trying with Inline but .. Its not Happening.... Kindly Help me ...

1 Solution

Accepted Solutions
Employee
Employee

Re: How to Get Max Date Selected on check box selection

I suggest you define a new field in the script, e.g.

If(Date=Today(), 'Today',

  If(Date=Today()-1, 'Yesterday', 'Older')) as MyDate

Then the user can click in this new field and the behaviour will be exactly what you describe.

HIC

5 Replies
MVP
MVP

Re: How to Get Max Date Selected on check box selection

Would you be able to share of what you have? It would help understand what you are trying to do.

Employee
Employee

Re: How to Get Max Date Selected on check box selection

I suggest you define a new field in the script, e.g.

If(Date=Today(), 'Today',

  If(Date=Today()-1, 'Yesterday', 'Older')) as MyDate

Then the user can click in this new field and the behaviour will be exactly what you describe.

HIC

Not applicable

Re: How to Get Max Date Selected on check box selection

Create the listbox, select one of the two values and then go to Properties > Always one Value Selected.

Capture.PNG

From there a simple set analysis (or if clause if you dont care about performance) will do the trick on your expressions.

brijeshma
Contributor

Re: How to Get Max Date Selected on check box selection

Thanks for Ur Reply Henric and Sunny,

I Want Today as My Max(Date)  and Yesterday as Max(Date)-1 .....

I have a Date as Field in my Master Calander . So when i select Today in List ...in Date field Max Date get select..

so that my Dashboard will that Date data only.

brijeshma
Contributor

Re: How to Get Max Date Selected on check box selection

Thanks Henric , And Thanks for Your Time

I Used ur Suggestion :

If(Date=$(vDateMax), 'Today',

  If(Date=$(vDateMax)-1, 'Yesterday', 'Older')) as MyDate