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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
ChumaAmako
Helper I
Helper I

Cálculo del saldo de cierre

Hola a todos,

Estoy tratando de calcular el stock a mano en cualquier fecha o mes, etc.

El stock a mano (SOH) se calcula como - Saldo de apertura + Envío - Ventas

"Saldo de apertura" se refiere al saldo de cierre del mes o período de tiempo anterior (Fecha, trimestre, año, etc.)

Tengo 2 tablas (Ventas y envíos) de las que saco datos, también tengo una tabla de fechas.

Por favor, vea a continuación la estructura de datos de las tablas y el resultado deseado que necesito

Puedo hacer esto muy fácilmente en Excel, pero no puedo parecer replicar en PowerBI, cualquier ayuda es muy apreciada.

image.png

@Greg_Deckler @ImkeF

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Muchas gracias por su ayuda @Ashish_Mathur

De nada.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

Cree un calendario de fechas común y una ambas tablas. crear un equilibrio de apertura como Excel es una opción. Así que tienes que empezar desde el principio. Así que la medida acumulativa ayudará a

Cumm Shipment  = CALCULATE(SUM(Shipment [Shipment]),filter(date,date[date] <=maxx(date,date[date])))
Cumm Sales  = CALCULATE(SUM(Sales [Sales]),filter(date,date[date] <=maxx(date,date[date])))

stock = [Cumm Shipment] -[Cumm Sales]

Tenga un mes-año en su tabla de calendario. Eso le permitirá almacenar en el nivel de mes

Para obtener lo mejor de la función de inteligencia de tiempo. Asegúrese de que tiene un calendario de fechas y se ha marcado como la fecha en la vista de modelo. Además, únase a él con la columna de fecha de su 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/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hola @amitchandak

Gracias por su ayuda, pero esto no resolvió lo que yo qué, ya que no tiene en cuenta el saldo de cierre del mes anterior

Vea la salida a continuación. Como puede ver Feb-20 no tiene en cuenta el saldo de cierre anterior de 300.

Por favor, haga clic AQUI para acceder al archivo de prueba si ayudaría

image.png

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors