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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.