The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am trying to create a key measure called Next PO Qty. I want the measure to return the Qty Ordered for the item on the PO with the minimum Expected Delivery Date AND has a status of "O" (i.e. Open). In the sample provided below I would expect the result for item 10007 to be 54.
PO Number | Item Number | Qty Ordered | Expected Delivery Date | Status |
00005292 | 10007 | 54 | 7/24/2019 | O |
00006212 | 10007 | 270 | 9/11/2019 | O |
00006162 | 10007 | 270 | 9/10/2019 | O |
00006051 | 10007 | 270 | 9/3/2019 | C |
00005934 | 10007 | 162 | 8/28/2019 | C |
00005809 | 10007 | 270 | 8/21/2019 | C |
00005660 | 10007 | 216 | 8/13/2019 | C |
Solved! Go to Solution.
Hi @Anonymous
1. Place Item Number in a table visual
2. Place this mesure in the visual
Next PO Qty = VAR EarliestDateO_ = CALCULATE ( MIN ( Table1[Delivery Date] ), Table1[Status] = "O" ) RETURN CALCULATE ( DISTINCT ( Table1[Qty Ordered] ), Table1[Delivery Date] = EarliestDateO_, Table1[Status] = "O" )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
Hi @Anonymous
1. Place Item Number in a table visual
2. Place this mesure in the visual
Next PO Qty = VAR EarliestDateO_ = CALCULATE ( MIN ( Table1[Delivery Date] ), Table1[Status] = "O" ) RETURN CALCULATE ( DISTINCT ( Table1[Qty Ordered] ), Table1[Delivery Date] = EarliestDateO_, Table1[Status] = "O" )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers