Forum Discussion

Whitewater100's avatar
Whitewater100
Icon for Solution Sage rankSolution Sage
2 years ago
Solved

Looking for Table in DAX

Remaining Inventory after Finalized orders Subtracted 

 

Hello Community:

 

I have created a table using some basic measures, see attached. I am looking for suggestions on how to write DAX as a table function for my main visual. Inventory is stored in multiple locations and orders in this case are subtracted from inventory if they are noted as finalized. 

I have the main visual which I'm looking to produce as a DAX table function.

Thank you!

  • Dangar332's avatar
    Dangar332
    2 years ago

    Hi, Whitewater100 

     

    new Table = 
    SUMMARIZECOLUMNS(Products[Product],WH_Loc[WH_Area],WH_Name[WH Name],
                     "total wh qty",SUM(WH_Inv[WH_Qty]),
                     "finalized order qty", CALCULATE(SUM(Orders[Order Qty]),Orders[Order Status]="finalized"),
                     "balance of INV(oh-final oq)",SUM(WH_Inv[WH_Qty])-CALCULATE(SUM(Orders[Order Qty]),Orders[Order Status]="finalized")
                     )

     

     

3 Replies