Forum Discussion
AdamPowerBI2024
Helper I
2 years agoLatest finished product and corresponding quantity
Hi, I want to create a last estimate of a produced item (so the latest finished product). I get it correctly with the below Dax formula: Last Estimate Order = VAR Last_estimate = MAXX(FILTER(AL...
- 2 years ago
Hi,
I think I've got it. Thank a lot for your help.
Last Order Quantity in Month (per Product Type) =VAR Last_estimate = MAXX(FILTER(ALLSELECTED(ProductionCalculations), ProductionCalculations[EndedDate.EndedDate]=MAX(ProductionCalculations[EndedDate.EndedDate])), ProductionCalculations[FinishedDate.Finished Date])RETURNCALCULATE(SUM(ProductionCalculations[Real consump Qty (kg)]),FILTER((ProductionCalculations),ProductionCalculations[FinishedDate.Finished Date]= Last_estimate&&ProductionCalculations[Productions.Prod Id] = CALCULATE(MAX ( ProductionCalculations[Productions.Prod Id] ),FILTER ( ProductionCalculations,ProductionCalculations[FinishedDate.Finished Date] = Last_estimate))))
AdamPowerBI2024
Helper I
2 years agoHi,
I think I've got it. Thank a lot for your help.
Last Order Quantity in Month (per Product Type) =
VAR Last_estimate = MAXX(FILTER(ALLSELECTED(ProductionCalculations), ProductionCalculations[EndedDate.EndedDate]=MAX(ProductionCalculations[EndedDate.EndedDate])), ProductionCalculations[FinishedDate.Finished Date])
RETURN
CALCULATE(SUM(ProductionCalculations[Real consump Qty (kg)]),
FILTER((ProductionCalculations),ProductionCalculations[FinishedDate.Finished Date]= Last_estimate
&&ProductionCalculations[Productions.Prod Id] = CALCULATE(MAX ( ProductionCalculations[Productions.Prod Id] ),
FILTER ( ProductionCalculations,ProductionCalculations[FinishedDate.Finished Date] = Last_estimate))))