Forum Discussion

WILFR3D2K24's avatar
WILFR3D2K24
New Member
2 years ago
Solved

DAX Calculated Column Creation for Inventory Tracking

Hi everyone, I'm currently facing some difficulty in generating a calculated column using DAX, whereas it's relatively straightforward using Excel.   1. Below is an image displaying a sample of th...
  • Jihwan_Kim's avatar
    2 years ago

    Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a new column.

     

     

    WINDOW function (DAX) - DAX | Microsoft Learn

     

    Quantity CC =
    SUMX (
        WINDOW (
            1,
            ABS,
            0,
            REL,
            Data,
            ORDERBY ( Data[CategoryIndex], ASC, Data[Date], ASC ),
            ,
            PARTITIONBY ( Data[Category] ),
            MATCHBY ( Data[CategoryIndex], Data[Date] )
        ),
        Data[Stock Replenishment] + Data[Shipments]
    )