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.
I am trying to do a running total by product and warehouse to get inventory balances. I am doing this in direct query as a measure on 1.3 million rows, before filtering by a part code. I isn't working.
I have tried
Remaining balance = CALCULATE(SUM(RC_Inventory_Movements_View[IC_MOVE_QUANTITY]),FILTER(ALL(RC_Inventory_Movements_View[MOVEMENT_DATE]),RC_Inventory_Movements_View[MOVEMENT_DATE]<=MAX(RC_Inventory_Movements_View[MOVEMENT_DATE]))
and total = SUMX(FILTER(ALL(RC_Inventory_Movements_View),RC_Inventory_Movements_View[MOVEMENT_DATE]<=MAX(RC_Inventory_Movements_View[MOVEMENT_DATE])),[MoveQTy])
neither are working. It just keeps spinning when adding it to a visual table.
We want to be able to select a part code and see the inventory movements along with ending balance(this needs to be calcuated i.e. the running total).
CALCULATE(
SUM(RC_Inventory_Movements_View[IC_MOVE_QUANTITY]),
FILTER(
ALL(RC_Inventory_Movements_View[MOVEMENT_DATE]),
RC_Inventory_Movements_View[MOVEMENT_DATE]<=MAX(RC_Inventory_Movements_View[MOVEMENT_DATE])
)
The data is just movements sorted by date and a qty moved. This screen shot is prefiltered by partcode.
In order to evaluate your calculations, we need more info - either a .PBIX with fabricated sample data or some examples of your data and the results you'd like to see.
I'd also run your code through Dax Formatter so we can read it more easily.
Example:
I have kind of same problem.
I do a summarize table grouping dates,items I'd, quantities, warehouses, movement types (composed of + and - types)
But impossible to use this to get a daily stock image. **bleep** hard
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |