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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Specialist
Specialist

Show current year data in filter pane qliksense

Hello All,

I have below field where the data is commencing from 2010 till now. 

Aspiring_Developer_0-1632214788617.png

My requirement is i have to show the data only for current year in this filter pane i.e it should show the dates starting from jan 2021 till the maximum. I don't know how to restrict this in filter pane.

 

@Kushal_Chawda 

Can anyone please help ?

Thanks in advance

5 Replies
RsQK
Creator II
Creator II

Hey, could be something like this:

 

=AGGR({<INPUT_YEAR={"$(=MAX(INPUT_YEAR))"}>}MIN(INPUT_DATE),INPUT_DATE)

 

You would need to create a year dimension from INPUT_DATE for this.

abhijitnalekar
Specialist II
Specialist II

Hi,

You can create a separate Currentyear date filed in the model and use the same field in the filter pane.

like below

'>=' & Date(YearStart(Max(Date)), 'MM/DD/YYYY') & '<=' & Date((Max(Date)), 'MM/DD/YYYY')

 

 

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
Aspiring_Developer
Specialist
Specialist
Author

@abhijitnalekar 

 

'>=' & Date(YearStart(Max(Date)), 'MM/DD/YYYY') & '<=' & Date((Max(Date)), 'MM/DD/YYYY')

This didn't worked in backend . Am i doing it correct ?

 

Aspiring_Developer_0-1632223926686.png

error - invalid expression

Aspiring_Developer
Specialist
Specialist
Author

@RsQK 

I tried , however, didn't worked.

Aspiring_Developer_1-1632224019764.png

 

RsQK
Creator II
Creator II

My script (before this just generated some dates):

RsQK_0-1632289098738.png

Front-end:

RsQK_1-1632289216255.png