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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Necesita una medida basada en semanas

Hola

Necesitaba una medida que debía clucitar el recuento de la columna Employee Num en función de las columnas Status y Assignment End in Week Ending. Mi tabla tiene datos de 12 semanas,la siguiente es la tabla de datos de ejemplo:

Empleado NumEstadoLa asignación termina en el fin de la semanaFecha de finalización de la asignación
10001Confirmación esperada5/3/20205/2/2020
100025/10/20205/10/2020
100035/17/20205/15/2020
10004No5/24/20205/23/2020
10004Confirmación esperada5/31/20205/31/2020

Medida1: Recuento de Employee Num, donde Status es + count of Employee Num donde Status is Confirmation awaited for next 4 weeks

Medida2: Recuento de Employee Num, donde Status es No+count ofEmployee Numwhere Status is Confirmation waited for remain remain 8 weeks

He intentado sin éxito para la medida1:

M_Confirmation Awaited RollOffs á CALCULATE(COUNT('Roll Off'[Employee Num]),FILTER('Roll Off','Roll Off'[Status] ?"Yes")) + CALCULATE(COUNT('Roll Off'[Employee Num]),FILTER('Roll Off','Roll Off'[Status] ? "Confirmation Awaited" && 'Roll Off'[Assignment End in Week Ending] <'WEEKNUM('Roll Off'[Assignment End Date],4)))
Por favor, ayuda a lograr esto.
Gracias
2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hola @sapuser ,

El segundo parámetro de la función WEEKNUM() debe ser 1 o 2. Si quiere sin decir devolver la fecha después de 4 semanas, debe consultar el siguiente DAX:

DATEADD('Table'[Assignment End in Week Ending],28,DAY)

DATEADD() es una función de inteligencia de tiempo, asegúrese de tener una tabla de fechas af primero.

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

@sapuser , Trate como
M_Confirmation Awaited RollOffs á CALCULATE(COUNT('Roll Off'[Employee Num]),FILTER('Roll Off','Roll Off'[Status] ?"Yes")) + CALCULATE(COUNT('Roll Off'[Employee Num]),FILTER(allselected('Roll Off'),'Roll Off','Roll Off'[Status] ? "Confirmation Awaited" && 'Roll Off'[Assignment End in Week Ending] <'max('Roll Off'[Assignment End in Week Ending])+28))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.