Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Diferencia horaria condicional

Hola a todos,

He estado luchando con esta tarea durante todo el día, he intentado varios enfoques, pero ninguno de ellos funcionó.

Tengo una tabla [status_log] que contiene los cambios de estado log de tickets. Por lo tanto, cada vez que un empleado cambia el estado de un ticket, el cambio se registra en esta tabla. Las columnas son:

TicketID - segmento - change_date - old_status - new_status

Un ticket se puede procesar en segmentos, por lo tanto, hay una columna de segmento.

Ejemplo:

163 - 1 - 7/9/2019 - listo - ejecución

163 - 1 - 14/9/2019 - ejecución- hecho

165- 1 - 1/9/2019 - listo - ejecución

165 - 1 - 10/9/2019 - ejecución- hecho

165- 2- 2/9/2019 - listo - ejecución

165 - 2- 7/9/2019 - ejecución- hecho

Lo que quiero es una tabla para registrar en qué fecha un ticket se convirtió en el estado de ejecución y cuándo cambió de ejecución.

Ergo: duración de la fase de ejecución.

Tenga en cuenta que cuando un billete tiene más de un segmento, solo se toma la fecha más temprana y más reciente.

Mi tabla:

TicketID - start_date - end_date

163 - 7/9/2019 - 14/9/2019

165 - 1/9/2019 - 10/9/2019

¿Puede alguien ayudarme por favor haciendo esta nueva tabla y buscar los datos mencionados?

Gracias de antemano!!

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@basel

Por favor, intente

Table = ADDCOLUMNS( SUMMARIZE(ticket,ticket[TicketID],"startdate",min(ticket[change_date])),"change_date",MAXX(FILTER(ticket,ticket[TicketID]=EARLIER(ticket[TicketID])&&ticket[old_status]="execution"),ticket[change_date]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@basel

Por favor, intente

Table = ADDCOLUMNS( SUMMARIZE(ticket,ticket[TicketID],"startdate",min(ticket[change_date])),"change_date",MAXX(FILTER(ticket,ticket[TicketID]=EARLIER(ticket[TicketID])&&ticket[old_status]="execution"),ticket[change_date]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

¡Muchas gracias, Ryan! Eso fue muy útil.

Salud

Basilea

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors