Forum Discussion
Estimated Delivery date based on cumulative count
- 4 years ago
learner03 OK, I simplified the equation and was able to eliminate the GENERATESERIES. Not sure why I didn't do it this way the first time. Try this one:
FIFO 2 = VAR __DaysToFulfill = 10 VAR __ItemCode = [Item Code] VAR __Date = [Date] VAR __QtyToFulfill = SUMX(FILTER('BackOrders',[Item Code] = __ItemCode && [Date] <= __Date),[Backorder Qty]) VAR __Table = FILTER('OpenPurchaseOrders',[Item Code] = __ItemCode) VAR __Table1 = ADDCOLUMNS( ADDCOLUMNS(__Table,"__tqty",SUMX(FILTER(__Table,[ETA W/H] <= EARLIER([ETA W/H])),[Quantity])), "__LoopCounter",[__tqty] - __QtyToFulfill ) VAR __TargetDate = MINX(FILTER(__Table1, [__LoopCounter] >= 0),[ETA W/H]) VAR __FulfillmentDate = IF(__TargetDate = BLANK(),BLANK(),__TargetDate+__DaysToFulfill) RETURN __FulfillmentDate
I used your formula in the attached link but I am getting this below error-
https://drive.google.com/file/d/1iLS6xW1GyQUB0SFk7QR6413YwKYcEAgl/view?usp=sharing
What does this mean?
learner03 Hmm. Very odd. I downloaded the file and do not get that error in the Column. That said, I did see that same exact error with a specific model setup and was thinking of posting an issue to the Issues forum which I think I will do now. I will post a link to the issue here once I open it. In the mean time, I have attached a version of the PBIX file that includes FIFO, LIFO, Optimized for Most Orders and Optimized for Most Quantity columns and measures.
- learner034 years ago
Post Partisan
Thanks Greg_Deckler
Is it possible for you to attach the file that I shared in the link in which you applied the same formula ad didn't get the error? I would like to see that if I download it at my end, then am I getting the same error or not.
- Greg_Deckler4 years ago
Community Champion
learner03 Sure, here is the link to the issue: GENERATESERIES Bug? - Microsoft Power BI Community
And attached the PBIX that I downloaded.
- learner034 years ago
Post Partisan
Greg_Deckler The file that you sent does has the old formula for the Column. It does not contain the new GENERATE series formula that you newly created. I need the fie in which you used the new formula at your end and didn't get any error as mine.Thanks