Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 Vasiliy_Beshent
		
			Vasiliy_BeshentGood day, everyone!
I have some throuble with expr. I need to get sum(Sales) over my filter.
On first page i got total sum, it work correct:
Sum({<t35PRDWAER = {'RUB'}>} DECNRPRDEC),
where t35PRDWAER field is currency, DECNRPRDEC is sales
On second page i want to get this, but it doesn't work:
Sum({<t35PRDWAER = {'RUB'}, BVRPBEDVTZ <= (VTRBEGDVTR + year - (365/BVRZAHWVTR))>} DECNRPRDEC),
where BVRPBEDVTZ is date of sale, VTRBEGDVTR is another date field, BVRZAHWVTR is something else.
Please, help me write expression correct. 

UPD1: MY FALSE, FRIENDS, i forget to tell that i got 'YYYYMMDD' format in date fields!
UPD2: HERE IS EXAMPLE.QVF, take a look, friends!
 
					
				
		
Check the date format of field "BVRPBEDVTZ' and the value which you get from "=(date(VTRBEGDVTR) + year - (365/BVRZAHWVTR))". The format has to be same.
It would be great if you can share qvw with sample data.
 
					
				
		
 Vasiliy_Beshent
		
			Vasiliy_BeshentFriends! I convert all dates in main script!
When load data:
CAST(vtr1.VTRBEGDVTR as date) as VTRBEGDVTR,
CAST(vtr1.BVRPBEDVTZ as date) as BVRPBEDVTZ
 
					
				
		
Fields BVRPBEDVTZ & VTRBEGDVTR will be in date format, but need to confirm if "=(date(VTRBEGDVTR) + year - (365/BVRZAHWVTR))" returns value in same date format.
 
					
				
		
 vinieme12
		
			vinieme12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		what is year in the below?
VTRBEGDVTR + year - (365/BVRZAHWVTR)
 
					
				
		
 Vasiliy_Beshent
		
			Vasiliy_Beshentthat right question, i thought already that this is function!
i need to minus 1 year from VTRBEGDVTR but how to write correct?
i wrote incorrect, sorry, friend 

 MK_QSL
		
			MK_QSL
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		use
Date(AddYears(VTRBEGDVTR,-1))
or
AddYears(VTRBEGDVTR,-1)
 
					
				
		
 Vasiliy_Beshent
		
			Vasiliy_Beshenti replace this
 
					
				
		
 Vasiliy_Beshent
		
			Vasiliy_Beshentadded sample data in post!
 
					
				
		
 Vasiliy_Beshent
		
			Vasiliy_Beshentadded example in post, please, take a look!
 
					
				
		
 Vasiliy_Beshent
		
			Vasiliy_Beshentadd an example in post! please, take a look!
