Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I have created this measure which selects either qtyshorttoship, qtyshortofsold, or buffer, depending on whether each value is greater than 0. Then it takes that value and subtracts from it 3 measures which represent the sum of items in stock or in progress.
VAR __input = IF([QtyShortToShip] > 0, [QtyShortToShip], IF([QtyShortOfSold] > 0, [QtyShortOfSold], [Buffer]))
VAR __result = __input - [WIR Stock] - [ASY In Progress] - [ASY Stock]
RETURN
IF(__result > 0, __result, BLANK())
However, the visual cannot be displayed. I'm thrown an error message: "Internal error: an expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.. The exception was raised by the IDbCommand interface."
How should I approach simplifying this expression?
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")
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 56 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 24 |