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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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