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
Syndicate_Admin
Administrator
Administrator

Problemas con las funciones de DAX

Hola comunidad,

Tengo un panel de ventas donde calculo el objetivo de ventas del mes a la fecha en función del número de días de cumplimiento que han pasado. Estoy obteniendo resultados correctos para todos los meses excepto marzo, junio y noviembre. El objetivo de ventas no cambia a medida que cambia el número de días, permanece estático.

He utilizado las siguientes funciones DAX:
Monthly_Target_Till_Date = ABS(CALCULAR([Month_WorkingDaysthathavepassed]*(DIVIDE((SUMA(Budget_File[Sum_of_Budget])/[Fulfillment_Days]),1))))

Month_WorkingDaysthathavepassed = CALCULATE([Fulfillment_Days]-[No.of_Working_Days_LeftInCurrent_Month])
Fulfillment_Days = CALCULATE(DISTINCTCOUNT('Fecha'[Day_Number_Year]),'Fecha'[Delivery_Days]="Jornada laboral")
No.of_Working_Days_LeftInCurrent_Month = COUNTROWS(
FILTRO(
CALENDARIO(
(Ahora()),
EOMES ( AHORA(), 0 )
), DÍA LABORABLE([Fecha], 2) < 6 && COUNTROWS(FILTRO('Fecha','Fecha'[Delivery_Days]="Vacaciones")
)
))


Cuando miro las cifras individuales de junio, parece No.of_Working_Days_LeftInCurrent_Month no se está ejecutando correctamente en el backend.

Dwisha_S_2-1685984790983.png

Cuando lo cambio a otros meses, el objetivo de ventas de MTD hasta la fecha se actualiza.

Dwisha_S_1-1685984764589.png

Por favor, ayúdame a

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Este problema se ha resuelto. Actualicé el operador && a OR "||".

No.of_Working_Days_LeftInCurrent_Month = COUNTROWS(
FILTRO(
CALENDARIO(
(Ahora()),
EOMES ( AHORA(), 0 )
), DÍA LABORABLE([Fecha], 2) < 6 || COUNTROWS(FILTRO('Fecha','Fecha'[Delivery_Days]="Vacaciones")
)
))

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Este problema se ha resuelto. Actualicé el operador && a OR "||".

No.of_Working_Days_LeftInCurrent_Month = COUNTROWS(
FILTRO(
CALENDARIO(
(Ahora()),
EOMES ( AHORA(), 0 )
), DÍA LABORABLE([Fecha], 2) < 6 || COUNTROWS(FILTRO('Fecha','Fecha'[Delivery_Days]="Vacaciones")
)
))

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.