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.
Hi Power BI Masters ;
İ need your help about calculating below issue pls
i have two tables as below
As you see i have delivery dates with different quantities.İ just want to distrubute the stock quantities (Table2) based on delivery dates.
and if the delivery date is same for each some products , i want that system will check document number and will give the stock firstly the product which document number is smaller .But system will never care document number if the delivery times are different while distrubuting.
after calculating i want a new column which in stocks are distributed as below
thanks for your supports
You may try using ISONORAFTER Function.
one of master gave me below measure to solve , but this formula is not working when the "requested delivery day " same ... and i can not reach him 😞
So i want to put a condition like that " if the requested delivery day is same , go and check document number and give the stock to smallest document number"
maybe below measure makes your help easier .
Distributed Stocks = VAR stock_to_distirubute = CALCULATE ( SUM ( Table2[Stock Qty] ), CROSSFILTER ( Table2[Product], Table1[Product], BOTH ) ) VAR Cumulativestock = CALCULATE ( SUM ( Table1[Requested Qty] ), FILTER ( ALLEXCEPT ( Table1, Table1[Product] ), Table1[Rquested Delivery Date] <= SELECTEDVALUE ( Table1[Rquested Delivery Date] ) ) ) VAR myqty = IF ( Cumulativestock > stock_to_distirubute, SELECTEDVALUE ( Table1[Requested Qty] ) - ( Cumulativestock - stock_to_distirubute ), SELECTEDVALUE ( Table1[Requested Qty] ) ) RETURN IF ( myqty < 0, 0, myqty )
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.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |