Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi Guys,
I'm problem with a formula into a gauge chart, here is:
=avg ( {$< EstadoReport = {"Em Curso","Em Contacto","Fecho Sucesso","Fecho Insucesso"},
Opty_Creat_Dt = {">=$(#=vInicio)<=$(#=vFim)"} > } (networkdays(date(Opty_Creat_Dt),date(Tlcl_Answer_Dt),$(allholidays))) )
I want to know the average in the last 90 days but using the networkdays.
"allholidays" is a variable with all holidays in my country.
This formula give "no data value" but I don't know why.
If I use:
=avg ( {$< EstadoReport = {"Em Curso","Em Contacto","Fecho Sucesso","Fecho Insucesso"},
Opty_Creat_Dt = {">=$(#=vInicio)<=$(#=vFim)"} > } ALL (networkdays(date(Opty_Creat_Dt),date(Tlcl_Answer_Dt),$(allholidays))) )
...works fine.
But I cannot use ALL.......
What I can to do?
Anybody can help me, please?
Thanks,
Rodrigo.
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI,
If you want to do same thing as you said then, you can calculate the day difference in load time only like this,
Load
ID,
Creation_Date,
Update_Date,
Update_Date - Creation_Date as Day_Difference
From
Xyz.
Then use the field Day_Difference to calculate the Average.
Regards,
Kaushik Solanki
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
There is one mistake i found in this expression. i.e the use of variable.
Try this expression - not sure that this will give you desired output, but variable's should be used like this.
    =avg ( {$< EstadoReport = {"Em Curso","Em Contacto","Fecho Sucesso","Fecho Insucesso"},
Opty_Creat_Dt = {">=$(#vInicio)<=$(#vFim)"} > } (networkdays(date(Opty_Creat_Dt),date(Tlcl_Answer_Dt),$(allholidays))) )
Regards,
Kaushik Solanki
 
					
				
		
Kaushik,
I'm sorry... but it occours the same.
It's no value data with both formulas.
Thanks,
Rodrigo.
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Can you tell me what actually you want to do and for what purpose.
Regards,
Kaushik Solanki
 
					
				
		
Hi,
I want to know the average number of days (working days) that enlapses between the dates (updated date and creation date).
Thanks,
Rodrigo.
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
How can it be the average, it should be the count of the days right...?
If not can you explain with an example.
Regards,
Kaushik Solanki
 
					
				
		
Hi,
I want to know the average... it is not a count.
Exemple:
Id Creation Date Update Date *Diff (upd date - creat date)
aaa 2010-12-22 2010-12-24 2
bbb 2010-12-21 2010-12-26 5
ccc 2010-12-23 2010-12-26 2 (christmas holiday)
ddd 2010-12-21 2010-12-22 1
Total count of the days: 10
Average: 2,5 days
In the other words, the date is closed on average 2 and a half days.
Thanks,
Rodrigo.
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI,
If you want to do same thing as you said then, you can calculate the day difference in load time only like this,
Load
ID,
Creation_Date,
Update_Date,
Update_Date - Creation_Date as Day_Difference
From
Xyz.
Then use the field Day_Difference to calculate the Average.
Regards,
Kaushik Solanki
 
					
				
		
Hi,
Ok.
Can I use in the load script the variable $holidays??
Thanks,
Rodrigo.
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Yes you can use the variable in load statement.
Regards,
Kaushik Solanki
