Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

If logic help in filter pane

Hi Experts,

Can any one please help me on below requirement.

In the below Month Year fitlerpane , could you please help me to show only Current year 2019 and Previous Year 2018 Related month Year values by take our 2017 Month year values  in UI

MonthYear.png.

4 Replies
pradosh_thakur
Master II
Master II

If(Year(MonthYear)= 2018 or Year(MonthYear)= 2019, MonthYear,null()) 

then supress null

 

If you are looking for this year and last year data use year(today()) and year(today())-1 instead of hard coding 2018 and 2019

Learning never stops.
VishalWaghole
Specialist II
Specialist II

Try this,

If(wildmatch(MonthYear,'*2018','*2019'),MonthYear)

Regards,
Vishal Waghole
mahitham
Creator II
Creator II
Author

Hi @pradosh_thakur 

Thanks for your help.

I am looking dynamic solution. I need to use max(Year) and Max(Year)-1 all month years.

I struck at if logic syntax.

Please help me on this.

 

VishalWaghole
Specialist II
Specialist II

First of all create Year field from your MonthYear field.
Then use below steps to dynamically take only latest two years from your year field.

Create two variable using below definition.

vMaxYear = max(Year)
vMaxYear1=max(Year,1)

Create list box using below expression.

=Aggr(Concat({<YEAR={'$(vMaxYear)','$(vMaxYear1)'}>} Distinct Year), Year)

Hope this will work for you.

Thanks,
Vishal Waghole