Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Solved! Go to Solution.
Hi,
I think I've got it. Thank a lot for your help.
Hi,
I think I've got it. Thank a lot for your help.
Hi @rajendraongole1. thank you for your solution. It works across whole production when looking for the last produced item. But I realized that I need to add 2 filters in that dax formula, 1 for produced item (as we have many) and the 2nd for month-Year. would it be able to add isflitered twice in this formula?
Thank you in advance,
Hi @AdamPowerBI2024 ,
Thank very much for @rajendraongole1 solution, I'll add the appropriate conditions based on this for your needs:
Last Estimate Qty =
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
)
)
&& ProductionCalculations[ProducedItem] = "YourProducedItem"
&& -- Add your produced item filter here
FORMAT (
ProductionCalculations[FinishedDate.Finished Date],
"MM-YYYY"
) = "YourMonthYear" -- Add your month-year filter here
)
)
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
HI, thank you, but still shows blank. While filtering different produced item and year month, I want to see the latest order for each month and for different product with quantity used for that order. I used this one one as proposed:
Hi,
any possible advice?
Thank you
Hi @AdamPowerBI2024 - You can adjust the DAX formula to include the correct filtering for the specific order that matches the Last_estimate. modified one below FYR
Last Estimate Qty =
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)
)
)
)
Hope this helps
Proud to be a Super User! | |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |