Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Oomsen
Helper III
Helper III

Salesforecast

Hola, estoy buscando una medida para pronosticar mis ventas.

Me gustaría sumar las ventas reales por mes hasta el mes actual.

Para otros meses me gustaría tener un promedio de los últimos 6 meses.

Ejemplo:

jan feb mrt apr puede jun jul aug

100 50 20 10 10 30

julio sería (100+50+20+10+20+30)/6 a 38

aug sería (50+20+10+20+30+38)/6 a 28

1 ACCEPTED SOLUTION

hola @Oomsen

Creo que no podría lograr en dax en power bi, esto ya que calculará por su propio valor, es muy difícil de lograr.

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Oomsen, utilice laminación 6 y divida por 6

Ejemplo

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

or

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

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.

@amitchandak, gracias por tus respons.

Mi medida actual es

fomzet á IF(MONTH(MIN(Dimdate[MaandVanJaar]))<-MONTH(TODAY()),
CALCULATE(SUM(Transactions[amountdc])*-1,'Ledger Ratings'[parent_description]IN-"Ingresos"-,ALL("Ledger Ratings"[parent_code_attr])),
CALCULATE(SUM(Transactions[amountdc])*-1,'Ledger ratings'[parent_description]IN-"Revenue"-,ALL("Ledger Ratings"[parent_code_attr]),DATESINPERIOD(Dimdate[Date],MAX(Dimdate[Date]),-6,MONTH))/6)
algunas partes están en holandés, lo siento por eso.
el resultado actual es que el mes pasado y el actual dan el valor correcto, pero los meses futuros están en blanco.

hola @Oomsen

Asegúrese de usar el campo Fecha de Dimdate en el objeto visual.

Si todavía tiene el problema, por favor comparta su archivo pbix de muestra para nosotros tener una prueba

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lili6-msft @amitchandak funciona.

Para los meses futuros está utilizando 0 para calcular el promedio en lugar del importe de la medida.

Ejemplo:

jan feb mrt apr may jun jul sep oct nov dec

10 10 20 30 40 50 27 25 23

Esperado:

jan feb mrt apr may jun jul sep oct nov dec

10 10 20 30 40 50 27 31 33

hola @Oomsen

Creo que no podría lograr en dax en power bi, esto ya que calculará por su propio valor, es muy difícil de lograr.

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors