Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Inventory on Hand es una tabla manual que calcula como la siguiente fórmula:
Me gustaría crear un informe como el siguiente:
Ahora mi salida es así:
Fecha de publicación | item_No | Inventario disponible | Nº de rollos |
07/31/2021 | M0001 | 36 | -12 |
08/06/2021 | M0001 | 36 | -14 |
08/09/2021 | M0001 | 36 | -4 |
08/10/2021 | M0001 | 36 | -6 |
Total | 36 | -36 |
La salida esperada es así:
Fecha de publicación | item_No | Inventario disponible | Nº de rollos |
07/31/2021 | M0001 | 36 | -12 |
08/06/2021 | M0001 | 24 | -14 |
08/09/2021 | M0001 | 10 | -4 |
08/10/2021 | M0001 | 6 | -6 |
Total | 0 | -36 |
¿Cómo puedo guardar el valor anterior y llevarlo al día siguiente....
Solved! Go to Solution.
Gracias por la respuesta. Intentaré usar su solución más adelante :D.
Sin embargo, finalmente resuelvo este problema de la siguiente manera:
Inventario disponible = CALCULATE(SUM('ItemInOutHistoryList'[No_of_Rolls]),FILTER('ItemInOutHistoryList','ItemInOutHistoryList'[Location_Code] = EARLIER('ItemInOutHistoryList'[Location_Code]) && 'ItemInOutHistoryList'[Item_No]=EARLIER('ItemInOutHistoryList'[Item_No]) && 'ItemInOutHistoryList'[Posting_Date].[ Fecha]<= ANTERIOR('ItemInOutHistoryList'[Posting_Date].[ Fecha]) - 1))
Resultado como se indica a continuación:
¿Tu modelo es así?
A continuación, pruebe la siguiente fórmula:
Measure =
var Pre =
CALCULATE(
SUM(ItemInOutHistoryList[No of Rolls]),
FILTER(
ALLSELECTED(ItemInOutHistoryList[Posting Date]),
ItemInOutHistoryList[Posting Date] < MAX(ItemInOutHistoryList[Posting Date])
)
)
return
IF(
ISFILTERED(ItemInOutHistoryList[Posting Date]),
SUM('Inventory on Hand'[Inventory on Hand]) + Pre,
SUM('Inventory on Hand'[Inventory on Hand]) + SUM(ItemInOutHistoryList[No of Rolls])
)
Si el problema aún no se resuelve, proporcione información detallada sobre el error o el resultado esperado que espera. Hágamelo saber de inmediato, esperando su respuesta.
Saludos
Winniz
Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente.
Gracias por la respuesta. Intentaré usar su solución más adelante :D.
Sin embargo, finalmente resuelvo este problema de la siguiente manera:
Inventario disponible = CALCULATE(SUM('ItemInOutHistoryList'[No_of_Rolls]),FILTER('ItemInOutHistoryList','ItemInOutHistoryList'[Location_Code] = EARLIER('ItemInOutHistoryList'[Location_Code]) && 'ItemInOutHistoryList'[Item_No]=EARLIER('ItemInOutHistoryList'[Item_No]) && 'ItemInOutHistoryList'[Posting_Date].[ Fecha]<= ANTERIOR('ItemInOutHistoryList'[Posting_Date].[ Fecha]) - 1))
Resultado como se indica a continuación:
@leafbear024 , una nueva columna como
nueva columna = [Inventario disponible] + sumx(filter(Table, [item_no] = earlier([item_no]) && [Posting_date] = earlier([posting_date])), [No of Rolls])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.