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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
miguelote
Regular Visitor

Inventario horizontal

Buen día a todos,

Tengo un problema con una función que se ve fácil pero no he podido solucionarla en DAX, y pido de su ayuda para resolverlo.

 

Mi problema es el siguiente:

tengo un inventario a la semana (week_1, fecha actual que es la fecha de actualización) y necesito calcular el estimado para las siguientes semanas (week_2, week_3, week_n), pero para week_1, se resta la cantidad por empaque multiplicado por un 1 (valor dado):

   valor de week_1= Inventario - (cantidad empaque * valor dado)

 

El problema viene cuando quiero utilizar el valor que obtuve en week_1 con la formula anterior:

   week_2 = week_1 - (cantidad per package * valor dado)

 

Con esto, quiero ver para las proximas semanas, el valor hasta week_n

Week_1 = 
CALCULATE(
    AVERAGE(TABLE INVENTORY[INVENTORY]) - ('Takt per week'[Takt per week Value] * AVERAGE(TABLE INVENTORY[QTY_PER_package]))
)

Algien me puede ayudar con esto?, mando una pequeña imagen de la tabla y su resultado esperado en formato horizontal

miguelote_0-1684174815811.png

 

3 REPLIES 3
miguelote
Regular Visitor

Thank you, I am sending a copy of the original report, which shows just what I need File to Example 

 

 

Component PartQty per AssemblySafety StockQuantity On HandRCTotal InventoryWK15WK16WK17WK18
sku1120000-1-2-3-4
sku2186206261605958
sku311811283938373635
sku4101601615141312
lbendlin
Super User
Super User

This should be possible via SUMX.  Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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