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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
george31
Regular Visitor

Problemas para calcular semana a fecha a partir de la fecha seleccionada

Estoy tratando de calcular el WTD (semana a la fecha a partir de los lunes) y las cifras de MTD / YTD en una tabla donde la persona puede seleccionar la fecha en la que basar esto.

Parece que debería ser bastante fácil, ya que queremos sumar el campo para todos los registros donde el número de semana coincide con el número de semana de la fecha seleccionada, pero no puedo conseguir el filtrado correcto.

Mi tabla base TRC que tiene datos en ella es (primera fila son los nombres de columna):

ColaFechaRespondió
Ayuda de TILun 2 Marzo 202047
Ayuda de TIMar 3 de marzo de 202045
Servicio al clienteLun 2 Marzo 2020707
Servicio al clienteMar 3 de marzo de 2020578

Estos datos ya se han resumido por simplicidad (en realidad puede haber un número de registros para la misma cola/fecha.

También hay una tabla de fechas que tiene cada fecha única que vincula/relacionado con esta tabla y se utiliza para la selección.

Ambas tablas tienen columnas adicionales con YEAR(date) * 100 + WEEKNUM(date) calculados para que pueda restringir los datos. En el ejemplo anterior devuelve 202010.

Lo que necesito es cuando el usuario selecciona Mon 2nd y luego obtiene:

Ayuda de TI con WTD de 47

WTD de Servicio al Cliente 770

Si Se selecciona Tue 3rd, obtén:

Ayuda de TI WTD 92

WTD de Servicio al Cliente 1285

El usuario también puede seleccionar una cola específica, por lo que solo verá los datos relacionados con eso.

Estoy teniendo problemas para mantener la fecha seleccionada, así como filtrar por el mismo campo de fecha para obtener WTD (y presumiblemente cifras MTD / YTD).

Han intentado

CALCULATE(SUM(TRC[Answered]), FILTER(ALL('Calendar'),'Calendar'[Date] ? [Selected Date]))
además de otras combinaciones, pero no puede hacer referencia a los campos weeknum en este caso.
Cualquier ayuda apreciada. Entender esto es un poco críptico, pero espero que me puedan poner en la dirección correcta.
Salud
1 ACCEPTED SOLUTION

@george31 ver adjunto, hay muchas tablas, para usted, basta con mirar el servicio al cliente y la tabla de calendario y las medidas en la tabla de servicio al cliente

Apreciaría Kudos 🙂 si mi solución me ayudara.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
george31
Regular Visitor

Corrección: las fórmulas deben haber sido < [Fecha seleccionada]

También han intentado

CALCULATE(SUM(TRC[Answered]), FILTER(TRC,TRC[dateYearWeek] - [Selected YearWeek]))
Y
CALCULATE(SUM(TRC[Answered]), FILTER(ALL('Calendar'),'Calendar'[calYearWeek] ? VALUES('Calendar'[calYearWeek]) && 'Calendar'[Date] <'MAX('Calendar'[Date])))
pero ninguno parece dar un resultado correcto y siempre parecen devolver el SUM (Respuesta) para el día seleccionado.

@george31 por lo que desea total de semana a fecha por cada cola y semana a partir del lunes, ¿correcto?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Muchas gracias @parry2k .

Solución muy simple.

Otra cosa que tuve que hacer es usar el Calendario[Fecha] en mi tabla / matriz en lugar de haber utilizado el TRC[Fecha] que parecen mostrar información adicional, pero no importa.

Apreciamos su ayuda rápida y precisa!!

@george31 ver adjunto, hay muchas tablas, para usted, basta con mirar el servicio al cliente y la tabla de calendario y las medidas en la tabla de servicio al cliente

Apreciaría Kudos 🙂 si mi solución me ayudara.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors