Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 maniram23
		
			maniram23
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Experts,
i am trying monthname function in set analysis.
this is my if condition expression,
Count( DISTINCT IF([SER_Work Type] = 'Accidental Repair', if(MonthName([SER_R/O Date]) = max(TOTAL MonthName([SER_R/O Date])), ROLIST.CENRO))).
=count(if(Left([Part No],3)='VAS',ROLIST.CENRO))
can you please help me.
 sdmech81
		
			sdmech81
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Please elaborate without writing expression as it looks wrong!
Or try to put something like :
var=(MonthName(max(Date)))
=count({<[OM_Org] = {'Accidental Repair'} MonthName(Date) = var>}CountryName)
If u want distinct put before CountryName.
Please try with above set or give more clarity.
Sachin
 sdmech81
		
			sdmech81
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Replace variables with yours.Thanks
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Where in your expression are you using set analysis? Can you share the expression?
 
					
				
		
 arulsettu
		
			arulsettu
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		may be try this
in script MonthName(Date) as Month
or Month(Date) as Month
count({<[OM_Org] = {'Accidental Repair'}, Month={$(=Max(Month))}>}CountryName)
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The LHS* of a set expression needs to be a field name, not a calculated value. So you may need to add these derived fields
MonthName([SER_R/O Date]) as MnDate ,
Left([Part No],3) as PartType,
Then you can use the derived fields in set expressions.
Count({<[SER_Work Type] = {'Accidental Repair'}, MnDate = {"=$(MonthYear(Max(MnDate)))"}>} DISTINCT ROLIST.CENRO).
* left hand side
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		And
=Count({<PartType = {'VAS'}>} ROLIST.CENRO)
