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

Tendencia de ventas de los últimos 6 meses con filtro Fecha

Hola a todos

Tengo aclaraciones para mostrar la tendencia de ventas de los últimos 6 meses con filtro de fecha. informe adjunto a continuación

Capture.PNG

Ventas (últimos n meses)

Var sum1
CALCULAR (
suma(Ventas[Importe asignado] ); DATESINPERIOD ( 'Fecha'[Fecha]; MAX ( 'Fecha'[Fecha]); -6; MES )
)

Suma de devolución1

Pasos de trabajo:

1. He utilizado esta lógica mostrar Ventas (últimos n meses) .

tablas utilizadas : 1. Fecha 2. Ventas 3. SalesOthers

Sector de filtro utilizado : Tabla de fecha trimestre+Columna año .

Tabla de tendencias elementos usados : --> Valores : Ventas (últimos n meses) --> Axiz : Sales(Fecha)

Cuando utilicé el importe de ventas de tablas de ventas, el filtro está trabajando para mostrar los valores de 2 trimestres anteriores.

Lo que no funciona :

Cuando sudo la SUMA la tabla salesOthers con datos de ventas la tendencia que muestra para todos los años .

Ventas (últimos n meses)

Var sum1
CALCULAR (
suma(Ventas[Importe asignado] ); DATESINPERIOD ( 'Fecha'[Fecha]; MAX ( 'Fecha'[Fecha]); -6; MES )
)
Var sum2-CALCULATE (
suma(VentasOtras[Ventas brutas eur]); DATESINPERIOD ( 'Fecha'[Fecha]; MAX ( 'Fecha'[Fecha]); -6; MES ))

VAR SUM3-SUM1+sum2

Suma de devolución3

issue.PNG

el problema es que he utilizado la columna de tendencia axiz de la tabla de fechas de venta. Si llamo a otros tabla de hechos salesOthermeasure muestra todos los datos .

¿Alguna ayuda?

7 REPLIES 7
parry2k
Super User
Super User

@Gopinath1991 está utilizando la fecha en el eje X de la tabla de ventas, debe ser de la tabla de fechas.

Me gustaría elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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

Si utilizo la tabla de fechas Qtr/Year . su shwoing sólo seleccionado cuarto en fitlerCapture.PNG

@Gopinath1991, no utilice la fórmula de 6 meses utilizando fechas en período o fechas entre,

Cualquier segmentación de fecha relativa del usuario

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

o referir este

https://www.youtube.com/watch?v=duMSovyosXE

Anonymous
Not applicable

He intentado su no trabajar para mí. Pero también tengo el mismo ejemplo que se menciona en el enlace de vídeo . ¿Puedo llegar a algún lugar. este es realmente gran problema para mí.

Hola @Gopinath1991 ,

¿Le importaría compartir su archivo .pbix? O bien, muestre los datos de muestra.

Saludos
Lionel Chen

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Anonymous
Not applicable

Aquí me fijó a continuación con si 2 medidas de hecho se unieron

Ventas (últimos n meses) 1
VAR MaxFactDate ?
CALCULATE ( MAX ( Ventas[Fecha de factura] ); TODO ( 'Fecha') )
Fecha actual del VAR : MAX ( 'Fecha'[Fecha] )
Fecha de inicio del VAR-EDATE(Currentdate;-40)

return if (MaxFactDate<-MAX('Date'[Date])&& MaxFactDate> startdate;
CALCULAR (
Ventas[Euros netos de ventas]; ALL('Date'[Year/Qtr]); FILTER(ALL('Date'[Date]);' Fecha'[Fecha]>startdate && 'Date'[Date] <'Currentdate)) ;blank())

Anonymous
Not applicable

@SqlJason Intenté usar tu http://sqljason.com/2018/03/display-last-n-months-selected-month-using-single-date-dimension-in-powe...

En su escenario, solo utilizó una tabla de hechos de ventas. Si utilizo 2 tabla de hechos no funciona . ¿podría ayudar en esto?

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.