Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sureshmaddipati
Contributor III
Contributor III

Show only specified values in filter pane

Hi,

I have year field as filter in which I have 2023 2024 2025 2026 2027 2028 values.

I want to show only 2024 and 2025 in filter 

Labels (1)
5 Replies
RamanaKumarChintalapati
Partner - Creator
Partner - Creator

Hi @sureshmaddipati ,

 

Please use below expression in Filter pane


If(WildMatch([Order Date.autoCalendar.Year], 2012,2013),[Order Date.autoCalendar.Year])


If(WildMatch([Year], 2024,2025),[Year])

RamanaKumarChintalapati_0-1714634509511.png

 

Thanks,
RamanaKumarChintalapati

Chanty4u
MVP
MVP

Try this 

Year = '2024' OR Year = '2025'

 

BrunPierre
Partner - Master
Partner - Master

This dynamically displays the current year and the following year

=Aggr(Only({<Year={">=$(=Year(Today()))<=$(=Year(Today())+1)"} >}Year),Year)

sureshmaddipati
Contributor III
Contributor III
Author

Hi Ramana ,

Can I keep this in a variable and use it in measure to pick selected year and -1year 

Ex: in measure i want to show 2024 and 2023 data can I use the suggested expression in a variable

RamanaKumarChintalapati
Partner - Creator
Partner - Creator

Hi @sureshmaddipati ,

 

As per my understanding I am giving the below solution, If I this is not your requirement please let me know.

 

Declare the Variable varMinMax =max(Year1)

 

Variable using within the Measure 

Sum({ <Year1 = {'$(=$(varMaxminYear))'}>} Sales)----max year sales

Sum({ <Year1 = {'$(=$(varMaxminYear)-1)'}>} Sales)---Previous Year Sales

 

 

Thanks,

Ramana Kumar Chintalapati.