Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Buenas,
Tengo un indicador para calcular los clientes con ventas en el año actual y me funciona perfectamente:
Count({<[Ventas Actual] = {">0"} >} DISTINCT Cod_Cliente)
Ahora intento calcular los clientes nuevos (creados hace menos de 90 días) con ventas en el año actual, pero me incluye los que tienen ventas 0. He probado dos expresiones pero no funcionan:
Count({<[Ventas Actual] = {">0"},fecha_alta_cli_formato={">=$(vAhora)"}>} DISTINCT Cod_Cliente)
count(distinct {$<fecha_alta_cli_formato={">=$(vAhora)"},[Ventas Actual] = {">0"}>} Cod_Cliente)
Gracias de antemano.
Un saludo.
Hi @elenarelinque ,
Below some questions:
What is the data format of fecha_alta_cli_formato field ?
What is the value of vAhora variable ?
Is Ventas Actual field the sales amount ?
Finally what is the actual result and the expected result?
Hi, thanks for your help!
What is the data format of fecha_alta_cli_formato field ?
The format should be ok because the expression is working regarding the date condition, however, this is the format:
What is the value of vAhora variable ?
=max(Date(FECHA_ALB-90,'DD/MM/YYYY'))
Also working in another KPI
Is Ventas Actual field the sales amount ?
Yes
Finally what is the actual result and the expected result?
The result is 2, but it should be one because one of the two new client doesn't have sales.
The thing is that I have a KPI for the new clients (count(distinct {$<fecha_alta_cli_formato={">=$(vAhora)"}>} Cod_Cliente))and another one for the clients with sales in the actual year (Count({<[Ventas Actual] = {">0"} >} DISTINCT Cod_Cliente)), but when I use the expression with the two conditions it doesn't work.
Count({<[Ventas Actual] = {">0"},fecha_alta_cli_formato={">=$(vAhora)"}>} DISTINCT Cod_Cliente)
Let's try with the below expression:
Count( {< Cod_Cliente = {"=Sum([Ventas Actual])>0"}, fecha_alta_cli_formato = {">=$(vAhora)"} >} DISTINCT Cod_Cliente )
I hope it can helps.
Best Regards