Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I am new in the forum and I was hoping I could find the answer I need for the KPI am working on. Its a calculation that need to have certain conditions. I am using the Aggr function in this calculation:
Avg(AGGR(
(Max(KM_OT)-Min(KM_OT))
/
(Max([Fecha OT])-Min([Fecha OT]))
*365,[Patente Vehículo]))
It works fine but I need to condition it with the following:
Min([KM_OT])>1000 and MAX([KM_OT])<200000 and (Max(KM_OT)-Min(KM_OT))>0
I am not being able to add these conditions as a set analysis, can you help me please?
Thank you
PM
You can try with IF.
Avg(AGGR(If(Min([KM_OT])>1000 and MAX([KM_OT])<200000 and (Max(KM_OT)-Min(KM_OT))>0,
(Max(KM_OT)-Min(KM_OT))
/
(Max([Fecha OT])-Min([Fecha OT]))
*365),[Patente Vehículo]))
You can try with IF.
Avg(AGGR(If(Min([KM_OT])>1000 and MAX([KM_OT])<200000 and (Max(KM_OT)-Min(KM_OT))>0,
(Max(KM_OT)-Min(KM_OT))
/
(Max([Fecha OT])-Min([Fecha OT]))
*365),[Patente Vehículo]))
Thank you! It works great, I was doing it the wrong way.
Regards,
PM
you welcome