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
siddharthsoam
Partner - Creator II
Partner - Creator II
Author

exp_snip.JPG

What is this part used for in the expression?

shraddha_g
Partner - Master III
Partner - Master III

Nulify the selections in order to avoid its effect and to make expression work according to Set analysis part

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

I am facing little discrepancy in the data. When I select quarter 2, it is showing me total service_rev as 22.62 in previous tab i.e. data for Q1, but when I select quarter1 in  filter it shows me 23.33 in the recent tab.

Filter selection quarter-Q1 Fiscal Year-2017

quarter1_snip.JPG

Filter selection quarter-Q2 Fiscal Year-2017

quarter2_snip.JPG

shraddha_g
Partner - Master III
Partner - Master III

I can see that table are referring to Recent Months & Previous Months

You need to check table with Recent Quarter and Previous Quarter

shraddha_g
Partner - Master III
Partner - Master III

PFA

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Hi Shraddha,

Sorry for replying late.

Actually I want a like to like comparison for example if  only i select  fiscal year, it should show me the previous fiscal year under the previous tab. If I select a quarter suppose Q2 it shuld show me Q1 under previous. Likewise for months ,but if I select quarter and months simultaneously example Q2 and August , then data for Q1 and May should be reflected under previous.

This functionality should work on multiple selections as well.

shraddha_g
Partner - Master III
Partner - Master III

It will work that way only

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Can we use mid function in max ex-

max({<fiscal_year={'FY'&(mid(fiscal_year,2)-1)}>}quarter)

I am getting an error doing so

shraddha_g
Partner - Master III
Partner - Master III

Try

max({<fiscal_year={"$(=Maxstring(fiscal_year))"}>}quarter)

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

This expression is working well, but I cannot use it in the following condition. I have embedded the expression in max_quarter.

concat( distinct if(mid(Quarters,2)=1,$(maxQuarter)),',')