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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rodvaldes
New Member

SUMA STOCK MENSUALES - SUMA DE MEDIDAS ACUMULADAS

Yo tengo el siguiente problema, necesito tener el stock mensual de cada tienda y despues sumar los stock de cada mes.

Tabla Movimientos:

Periodo;Mov;Tipo;Cantidad

201906;Tienda1; Entrada;15

201907;Tienda1;salida;-1

 

201906;Tienda2;Entrada;15

201906;Tienda2;Salida;-5

201907;Tienda2;Entrada;10
201908;Tienda2;Entrada;10

 

Hice una medida usando la tabla calendario:

 

Stock Mensual =
CALCULATE(sum(ConsignacionesMovimientos[CantidadFactor]);
FILTER(ALL(Calendario);Calendario[Fecha]<=MAX(Calendario[Fecha])))

Y que tengo es este cuadro (considerar que para la tienda 1 en Agosto no hay movimiento)
 
Tienda;Periodo;Stock Mensual
Tienda1;201906;15
Tienda1;201907;14
Tienda1;201908;14
 
Tienda2;201906;10
Tienda2;201907;20
Tienda2;201908;30

 

¿Como puedo sumar todos los stocks? Es decir: Tienda = 43 y Tienda 2 = 60

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi, @rodvaldes 

If you still have the problem, please share a simple sample pbix file, It would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

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.
Vvelarde
Community Champion
Community Champion

 

@rodvaldes 

 

Hi, try with this measure:

 

Medida = SUMX(VALUES(Calendario[Periodo]),[StockMensual])

 

Medida.png

Regards

 

Victor




Lima - Peru

El problema que tengo que el Stock Mensual no es un campo en la tabla, sino que es una medida. Lo probe y no me funciono.

@rodvaldes 

 

I test it with your sample table and using the measure that you put it.

 

And add the last measure using Stock Mensual Mesaure.

 

Maybe your structure is different.

 

Regards

 

Victor

 




Lima - Peru

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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