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

12 M rodando por cliente

Estimado todo, tengo este conjunto de datos a continuación (filtrado por cliente)


Power BI 12 M per customer.JPG

Estoy tratando de crear una columna donde las ventas acumuladas YTD a partir de la fecha del año pasado, por lo que habrá un total de ventas de los últimos 12 meses. He probado algunas fórmulas, pero de alguna manera no puedo tener éxito donde estoy buscando.

En la columna 12M he añadido fórmula:

CALCULATE(Sum('DSO Sales PDF'[Ventas]),DATESBETWEEN('DSO Sales PDF'[Dateformat],NEXTDAY(SAMEPERIODLASTYEAR('dDate Sales'[Month+Year])),LASTDATE('dDate Sales'[Month+Year]))
Pero de alguna manera sólo recoge las ventas del mes de inicio.

En la columna ventas individuales he añadido fórmula:
Ventas individuales (CALCULATE(SUM('DSO Sales PDF'[Ventas]),ALLEXCEPT('DSO Sales PDF','DSO Sales PDF'[Cliente])))
Esto calcula las ventas totales de un cliente, por lo que he intentado agregar un filtro en esta fórmula que podría recoger las ventas de los últimos 12 meses.
¿Puede alguien ayudarme a obtener la fórmula correcta?
¡Gracias!
Ramon
2 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@RNooijen debería agregarlas como medidas, no como columnas.



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

amitchandak
Super User
Super User

@RNooijen , No estoy seguro de que lo entiendo completamente

¿Se trata de una tabla de fechas 'dDate Sales'? y esta es la columna de fecha en la tabla de fechas [Mes+Año] ?

Ejemplo de rodadura 12 M con calendario Dat

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-12,MONTH)) 
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX(Sales[Sales Date]),-12,MONTH))  

Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de que tiene un calendario de fechas y que se ha marcado como la fecha en la vista de modelo. Además, únase a ella con la columna de fecha de su/s hecho/s. Consulte:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Vea si mi seminario web sobre Time Intelligence puede ayudar: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Apreciamos tus Felicitaciones.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@RNooijen , No estoy seguro de que lo entiendo completamente

¿Se trata de una tabla de fechas 'dDate Sales'? y esta es la columna de fecha en la tabla de fechas [Mes+Año] ?

Ejemplo de rodadura 12 M con calendario Dat

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-12,MONTH)) 
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX(Sales[Sales Date]),-12,MONTH))  

Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de que tiene un calendario de fechas y que se ha marcado como la fecha en la vista de modelo. Además, únase a ella con la columna de fecha de su/s hecho/s. Consulte:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Vea si mi seminario web sobre Time Intelligence puede ayudar: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Apreciamos tus Felicitaciones.

Anonymous
Not applicable

Hola @parry2k y @amitchandak,

Muchas gracias chicos con la fórmula en una medida que funcionó :)!

parry2k
Super User
Super User

@RNooijen debería agregarlas como medidas, no como columnas.



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.

Anonymous
Not applicable

Hola @parry2k,

Gracias por los comentarios, voy a tratar con una medida.

¿Sabes qué fórmula debo usar en esta Medida?

¡Gracias!

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.