Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
csampallo
Contributor
Contributor

Función para contar reincidencias de x cliente durante un periodo

Hola a todos, soy nuevo en qsense, Les agradecería su ayuda o apoyo en lo siguiente:

Actualmente estoy trabajando en un reporte donde se muestran todos los clientes con no han ingresado la fecha de un despacho, y cuando los  clientes  actualizan esta info, éstos salen del reporte acusete por así decirlo.

Lo que necesito ahora es contar la reincidencia que tiene cada cliente, ósea, si el cliente "pepito" salió en el reporte anteayer,  y no ingresó la info, luego salió en el reporte ayer y tampoco la ingresó, luego sale hoy en el reporte , entonces el reporte debería mostrar que el cliente "pepito" tiene reincidencia de 3 días sin ingresar la información.

Eso estimados, si me pudieren orientar estaría muy agradecido.

saludos !!

csampallo

4 Replies
TcnCunha_M
Creator III
Creator III

Hi

this more data Architecture than the tool itself, you can handle this in the data base with a Slowly Changing Dimension (SCD).

Or everybody who appear in that report  you create a flag , so you create an Qvd with this information

Id,  Client Name ,  Date_Not_update, Date_ok

When he finally not appear in the report you update  Date_ok

 

then make a calculation  Date_ok -Date_Not_update 

As you think, so shall you become.
csampallo
Contributor
Contributor
Author

Hola,

Excelente!! muchas gracias por orientarme. 

Tratare de crear una dimensión. Te cuento luego como me va.

saludos y gracias!!

Aasir
Creator III
Creator III

Create a flag for missing information
YourData:
LOAD
Client,
Date,
InformationEntered,
If(IsNull(InformationEntered), 1, 0) as MissingInfoFlag
Resident YourData;

Then create a Master calendar finally you can create a recurrence count
YourDataRecurrence:
LOAD
Client,
Date,
InformationEntered,
MissingInfoFlag,
If(
MissingInfoFlag = 1,
Above(If(MissingInfoFlag = 1, 1, 0), 1) + 1,
0
) as RecurrenceCount
RESIDENT YourData;


TcnCunha_M
Creator III
Creator III

If the answer works, make as answered question

As you think, so shall you become.