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

Calcs YTD, QTD y MTD del año anterior utilizando una calandra no estándar

Hola

¡Espero que todos estén teniendo un miércoles maravilloso! Mi firma usa un calendario 445, y estoy tratando de realizar cálculos YTD, QTD y MTD en años anteriores. Puedo devolver el valor adecuado del año anterior por fecha; sin embargo, estoy teniendo problemas con los calcs de inteligencia de tiempo. ¡Muchas gracias por su ayuda!

Ventas: Neto (A_PY_445) =
DÓNDE CurrentDoW = VALOR SELECCIONADO( 'Fecha'[DoW#] )
DÓNDE CurrentWeek445 = VALOR SELECCIONADO( 'Fecha'[Semana#_445] )
DÓNDE AñoActual445 = VALOR SELECCIONADO( 'Fecha'[Year_445] )

DEVOLUCIÓN
CALCULAR( [01_Sales: Net Daily (A_CY_ALL)] ,
FILTRO( TODO( 'Fecha' ) ,
'Fecha'[DoW#] = CurrentDoW &&
'Fecha'[Semana#_445] = CurrentWeek445 &&
'Fecha'[Year_445] = AñoActual445 - 1 ) )

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@AllenStuhr , debe seguir este enfoque utilizando la fecha de inicio de cada período

Necesita una columna basada en la fecha del período de inicio o el período del año en la tabla de fechas

Rango del período = RANKX(all(Period),Period[year period],,ASC,Dense)

Luego mide
Este período = CALCULATE(sum('Tabla'[Qty]), FILTER(ALL(Period),Period[Period Rank]=max(Period[Period Rank])))
Último período = CALCULATE(sum('Tabla'[Cantidad]), FILTER(ALL(Period),Period[Period Rank]=max(Period[Period Rank])-1))

Período personalizado de Power BI hasta la fecha (PTD): https://youtu.be/rQ3Z_LtxwQM

Calendario DAX: calendario estándar, calendario no estándar, calendario 4-4-4
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s

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.