Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 siddharthsoam
		
			siddharthsoam
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		have a look at the attached.
 
					
				
		
 devarasu07
		
			devarasu07
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You have missed that curly bracket, just add like below try again. tks
Max({<[Fiscal Year]={'FY16'}>}(mid(Quarters,2)))
 siddharthsoam
		
			siddharthsoam
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sorry Devarasu forgot that  but I am still facing another problem. The following max condiotion is not working in the expression with concat
 but I am still facing another problem. The following max condiotion is not working in the expression with concat 
Concat(Distinct 'Q' & if( (( mid(Quarters,2))-1)>0 and [Fiscal Year]='FY17', ( mid(Quarters,2))-1, (Max({<[Fiscal Year]={'FY16'}>}(mid(Quarters,2))))),',')
Its showing nested aggregation not allowed.
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		what are you trying to do here?
 siddharthsoam
		
			siddharthsoam
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Shraddha,
I have my quarters as Q1,Q2,Q3,Q4 so I am generating previous quarters for the respective selection. Mid function is used to fetch 1 from Q1. For Q0 it should show me quarter 4 or the maximum quarter for year FY16
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		do you have access to script?and do you have date field in data model?
 siddharthsoam
		
			siddharthsoam
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes I have access to script , I don't have any date field in data model
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi sidharth
do you want only the previous quarter for the date selected in a text box or something. This doesn't need to be this complicated. Can you share the input and expected output.
regards
Pradosh
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		MonthField?
 siddharthsoam
		
			siddharthsoam
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes I have a month field
