Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
fabs(avg({<productdate={'>$(=date($(vmaxperiod)-$(vdaysfortrending)<=$(=date($(vmaxperiod)))'}sales/1000))
 
					
				
		
Hi,
fabs(avg({<productdate={'>$(=date($(vmaxperiod)-$(vdaysfortrending)<=$(=date($(vmaxperiod)))'}sales/1000))
Here >$(=date($(vmaxperiod)-$(vdaysfortrending) it will give maxperod - no.of days for trending is greaterthan
and )<=$(=date($(vmaxperiod) less than of maxperiod of average of sales it should be in positive.
using fabs it vl convert negative value to positive
 miikkaqlick
		
			miikkaqlick
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi!
This returns absolute value for average of sales over certain period. Divided by 1000.
Br,
Miikka
Climber
 
					
				
		
.png) JonnyPoole
		
			JonnyPoole
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		For the date range in the user's selection, return the average sales for the previous number of days where the number of previous days is equal to the variable: vdaysfortrending.
The averages will be divided by 1000 , and any negative number will be rendered as an absolute value (fabs())
 
					
				
		
Hi,
fabs(avg({<productdate={'>$(=date($(vmaxperiod)-$(vdaysfortrending)<=$(=date($(vmaxperiod)))'}sales/1000))
Here >$(=date($(vmaxperiod)-$(vdaysfortrending) it will give maxperod - no.of days for trending is greaterthan
and )<=$(=date($(vmaxperiod) less than of maxperiod of average of sales it should be in positive.
using fabs it vl convert negative value to positive
 
					
				
		
If you got it just mark it as correct answer and close the thread
