Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 rathnam_qv
		
			rathnam_qv
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
Hi all,
i hv the following number format from that i have to calculate Quartes..
how to do that can any one help me...
Thanks in advance
Smiley
 
					
				
		
Are these no. Representing date?
If yes
Then first You can convert them in Date Format by using Date(Fieldname,'DD/MM/YYYY') and then make quarter using the month in it.
 Gysbert_Wassena
		
			Gysbert_WassenaIt looks like your ABC field contains numeric dates. That's good. ceil(month(ABC)/3) will then create the quarternumbers. It's best to create a Quarters field in the script. Below is an example (so don't copy it blindly into your script):
Load
ABC,
Month(ABC) as Month,
dual('Q' & ceil(month(ABC)/3), ceil(month(ABC)/3)) as Quarter
Year(ABC) as Year
From ...sourcedata...;
By using the dual function the Quarter field will have a numeric value (1 to 4) and a display value Q1 to Q4.
 vikasmahajan
		
			vikasmahajan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		| 'Q' & alt(if(Month(TempDate)<4,4),if(Month(TempDate)<7,1),if(Month(TempDate)<10,2),3) AS Quarter, | 
take that date with tempdate and give above formula for Qtr
Vikas
 
					
				
		
 mdmukramali
		
			mdmukramali
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear,
kindly find the attachment.
Thanks,
Mukram.
 
					
				
		
 CELAMBARASAN
		
			CELAMBARASAN
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try with
'Q' & Ceil(Month(DateField) / 3) AS QuarterFieldName
 polisetti
		
			polisetti
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		convert them in Date Format by using Date(Fieldname,'DD/MM/YYYY')
And then
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter;
 
					
				
		
 salto
		
			salto
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Dual('Q'&Num(Ceil(Num(Month(Date))/3)),
Num(Ceil(NUM(Month(Date))/3),00)) as [Quarter],
Year(Date)&Dual('Q'&Num(Ceil(Num(Month(Date))/3)),
Num(Ceil(NUM(Month(Date))/3),00)) as [Year Quarter] ;
Do work for me in all my documents.
Regards!
