Forum Discussion
Internal Error - complex expression must be simplified?
Hi
Unfortunately it is very difficult to help you if you don't give us the definition of all the measures
[QtyShortToShip]
[QtyShortOfSold]
[Buffer]
[WIR Stock]
[ASY In Progress]
[ASY Stock]
Then, we might be able to help you.
I can provide that, but since posting this I made another realization: the measure fails to load just this portion alone:
IF([QtyShortToShip] > 0, [QtyShortToShip], IF([QtyShortOfSold] > 0, [QtyShortOfSold], [Buffer]))
Maybe that gives another clue. Here are the definitions for those measures and the measures that are used within them:
QtyShortToShip = SUM(ProductionItems[QtyShipping]) - [Finished Stock]
QtyShortOfSold = [Sold] - [Finished Stock]
Finished Stock = CALCULATE(SUM(InventoryMaster[Qty]), LocationMaster[Code] IN {"FIN1", "FIN1C", "FIN1I"})
Buffer = SUM(ProductionItems[BufferQty])
Sold = SUM(DocumentLine[QtyToShip])
WIR Stock = CALCULATE(SUM(InventoryMaster[Qty]), ItemMaster[Stage] = "WIR", LocationMaster[LocationType] = 2)
ASY Stock = CALCULATE(SUM(InventoryMaster[Qty]), ItemMaster[Stage] = "ASY", LocationMaster[LocationType] = 2)
ASY In Progress = CALCULATE(SUM(ProductionRun[QtyAssigned]), ProductionRun[CloseDate] = BLANK(), ProductionRun[ProductionStage] = "ASY")