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: 
Anjaneya_prasad_Chattu
Contributor II
Contributor II

Show only last 10 business dates

Hello everyone,

I have a question about displaying only the last 10 business dates in the filter pane. But i want all business dates in backend. Here are the business dates I have so far:

Month Business Date
January 2024-01-31
February 2024-02-29
March 2024-03-29
April 2024-04-30
May 2024-05-31
June 2024-06-28
July 2024-07-31
August 2024-08-01
August 2024-08-02
August 2024-08-05
August 2024-08-06
August 2024-08-07
August 2024-08-08
August 2024-08-09

 

I need to filter the data to show only the last 10 business dates. How can I set this up in the filter pane?

Thank you!

 

Labels (1)
2 Solutions

Accepted Solutions
Kushal_Chawda

@Anjaneya_prasad_Chattu 

If you want last 10 business date excluding missing dates then try below

=aggr(only({<Date ={">=$(=date(max(Date)-9))<=$(=date(max(Date)))"}>}Date),Date)

If you want last 10 business date including missing dates then try below

=aggr(only({<Date ={">=$(=max(Date,10))<=$(=max(Date))"}>}Date),Date)

View solution in original post

Anjaneya_prasad_Chattu
Contributor II
Contributor II
Author

Thank You @Kushal_Chawda , It worked.

 

View solution in original post

3 Replies
Padma123
Creator
Creator

Try  This.....

table2:

load Month,
 [Business Date]
where not Match(WeekDay([Business Date]),'Sat','Sun') and RowNo()<10;


load * Resident table1
order by [Business Date];

Kushal_Chawda

@Anjaneya_prasad_Chattu 

If you want last 10 business date excluding missing dates then try below

=aggr(only({<Date ={">=$(=date(max(Date)-9))<=$(=date(max(Date)))"}>}Date),Date)

If you want last 10 business date including missing dates then try below

=aggr(only({<Date ={">=$(=max(Date,10))<=$(=max(Date))"}>}Date),Date)

Anjaneya_prasad_Chattu
Contributor II
Contributor II
Author

Thank You @Kushal_Chawda , It worked.