Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hy,
I´m using this variable
V_Contagem_Tempo=if(TEMPO_PROCESSO.CD_TIPO_TEMPO_PROCESSO=30,'CHAMADA','ATENDIMENTO')
In the expression of a chart I do this expression
=
IF(V_Contagem_Tempo='CHAMADA', MIN(TEMPO_PROCESSO.DH_PROCESSO)-ATENDIME.DH_PRE_ATENDIMENTO_FIM, MIN(PREST_USER_DOCUMENTOS.DT_REGISTRO_DOC)-ATENDIME.DH_PRE_ATENDIMENTO_FIM)
How can I put an AVG function with this expression
AVG(MIN(TEMPO_PROCESSO.DH_PROCESSO)-ATENDIME.DH_PRE_ATENDIMENTO_FIM, MIN)
DON´T WORK....
Any Idea?
Thanks for the help.
Thank you... but don´t work...
I´m not using a range of values.
I´m using a conditional expression.
But if you help me to do a AVG with the expression bellow it´s fine.
MIN
(PREST_USER_DOCUMENTOS.DT_REGISTRO_DOC)-ATENDIME.DH_PRE_ATENDIMENTO_FIM)
Sorry for my english.....
Thanks
Hi,
Is that you want :
rangeavg(MIN(TEMPO_PROCESSO.DH_PROCESSO)-ATENDIME.DH_PRE_ATENDIMENTO_FIM,MIN(PREST_USER_DOCUMENTOS.DT_REGISTRO_DOC)-ATENDIME.DH_PRE_ATENDIMENTO_FIM))
Thank you... but don´t work...
I´m not using a range of values.
I´m using a conditional expression.
But if you help me to do a AVG with the expression bellow it´s fine.
MIN
(PREST_USER_DOCUMENTOS.DT_REGISTRO_DOC)-ATENDIME.DH_PRE_ATENDIMENTO_FIM)
Sorry for my english.....
Thanks
are you using a straight table ?
No, i´m using a gauge chart.
I don't understand what you want, why do you want to do an avg if you do a min ?
if you really want to do an avg, you must have a dimension that you have to use with aggr() function like this :
avg(aggr(YourExpression, Dimension))
Let me explain..
I have a select that bring´s me this
cd_triag, cd_document, dh_document
1:n
But in a lot of times the same cd_atend have a lot of documents (this is ok)
I have another table that contains
cd_atend, dh_atend
1:1
I need to calculate de time between the first document by dh(date hour) of document and the dh(data hour) atend for this I use.
min(dh_document) - dh_atend
But I have a lot of values on database that have 450 GB of data, and a need to make a average of the expression above.
The logical is to do a gauge chart that´s represents the average time in a selected date and show if the time is ok, our not ok. Depending on criterias.
Again, sorry for my english.
And thank you for the help.
Ok,
If I were you, I will calculate the expression in the load script, like this :
interval(min(dh_doc) - dh_atend) as dh_interval
Maybe, you should be transform your datas to attempt this formula...
After that, you have to use this field for your average :
avg(dh_interval)
The problem is how to count the first register of table, only the first register must be calculated.
Sorry, but I don't understand what you want...