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

Can we put condition in max function

Hi

I want to apply a condition in max function.

Max({<[Fiscal Year]='FY16'>}( mid(Quarters,2)))

Ideally it should give me 4, but its not returning any value.

75 Replies
sunny_talwar

May be create a new field like this

addmonths(Date(Date#(Months &' ' &if(wildmatch(Months,'Jan','Feb','Mar'),[Fiscal Year]+1,[Fiscal Year]),'MMM YYYY')),-2) as Previous2MonthStart,

And then instead of using MonthStart = p(QuarterStart), use MonthStart = p(Previous2MonthStart)

sunny_talwar

Any update on this?

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Thanks buddy, your expression is working perfect for showing previous quarters data. For now my requirement is limited to single selection in months filter.

Appreciate your help

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Thanks for coping with me Shraddha

Appreciate it

sunny_talwar

Oh so you are saying that your requirement changed again?

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

haha yeah for the better this time , earlier it was not working for any selection in months filter now its working for a single selection. The requirement for multiple selections for quarter was feasible but showing it for months was not significant. Thus the requirement was scrapped off.

But I would have been totally helpless without the previous month expression.