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

DATEADD y EL MES ANTERIOR no funcionan

Hola a todos,

Actualmente estoy trabajando con un nuevo conjunto de datos con fechas y venta

Me gustaría calcular el cambio de MOM en la venta

Usé PREVIOUSMONTH() de tal manera que

•Calcular(Ventas[Ventas totales],PREVIOUSMONTH(Fecha[Fecha])

pero no funciona y regresó en blanco en su lugar, lo mismo va a DATEADD

He comprobado la relación entre mi tabla de fechas y mi columna de fecha en la tabla de ventas y están conectados, también he comprobado el formato de la columna de fecha y son los mismos, por favor ayuda!!

@amitchandak

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HOLA @_ssssaaarra,

Si comparte un archivo pbix con algunos datos ficticios para probarlo, debería ser útil para solucionar problemas.

Cómo obtener respuestas a su pregunta rápidamente
BTW, también puede intentar utilizar funciones de fecha para establecer manualmente rangos de filtro para el cálculo, debe más agilidad que las funciones inteligentes de tiempo y no requiere una tabla de calendario completa.

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@_ssssaaarra , ¿cuáles son las fechas seleccionadas en su página, si no hay fecha, entonces tomará la primera fecha de la tabla de fechas

Calculate(Sales[Total Sales],PREVIOUSMONTH(Date[Date])

Así que si sales hasta este mes y quieres dar rebanadora. La mejor opción es

recordar fechasmtd tomar la última fecha del calendario / fecha si la fecha no está seleccionada

Ventas MTD: CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
Last MTD Sales - CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Ventas del último mes: CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
este mes , Ventas MTD , CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
Last MTD (completar) Ventas : CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))

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.