Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

Show date for current year in filter pane qliksense

Hello All,

I have below data :-

Input Date:-

Aspiring_Developer_0-1632233337876.png

 

I want to show the dates only for current year . i tried below :-

=Date(aggr(only({<INPUT_DATE = {">=$(=Date(Yearstart(today()-1)))<=$(=Date(today()))"}>}INPUT_DATE),INPUT_DATE),'MMM-YY')

Aspiring_Developer_1-1632233389889.png

 

I am able to get the dates for current year but i am getting repetitive records like below :-

Aspiring_Developer_2-1632233431864.png

I know it is because in the original date field we have data like this 1/1/2021, 1/2/2021..so on

Is there any way that I can show only record like Jan 2021, Feb 2021 and so on .. in filter pane.

Thanks in advance

@Kushal_Chawda 

 

1 Solution

Accepted Solutions
Kushal_Chawda

@Aspiring_Developer  try below

=Date(monthstart(aggr(only({<INPUT_DATE = {">=$(=Date(Yearstart(today()-1)))<=$(=Date(today()))"}>}INPUT_DATE),INPUT_DATE)),'MMM-YY')

View solution in original post

2 Replies
Kushal_Chawda

@Aspiring_Developer  try below

=Date(monthstart(aggr(only({<INPUT_DATE = {">=$(=Date(Yearstart(today()-1)))<=$(=Date(today()))"}>}INPUT_DATE),INPUT_DATE)),'MMM-YY')

Aspiring_Developer
Creator III
Creator III
Author

Hi @Kushal_Chawda 

Thank You for the answer.

If  i have to combine week number in this filter, how can i restrict the same ?

I have week numbers like below :-

Aspiring_Developer_0-1632240639547.png

How can i combine my week number and input month in one field and show it in filter pane like :-

Sept 2021 & week 36

This will help user to understand what week  number is aligned with each month .

Can you please help me ?

Thanks in advance