Forum Discussion

markuslegeler's avatar
markuslegeler
New Member
2 years ago
Solved

DAX command for continuous sum bassed on each row

Dear community, I already tried several possibilities to sum up row by row based on the following table: quantity in kg Pt/Ru unit (kg) type sorting Index actual stock expected values 6...
  • ThxAlot's avatar
    2 years ago
    Actual = 
    CALCULATE(
        CALCULATE(
            SUM( STK[Quantity in kg Pt/Ru] ),
            STK[Type] IN { "local stock", "production order" }
        )
            - CALCULATE( SUM( STK[Quantity in kg Pt/Ru] ), STK[Type] = "order" ),
        STK[Index] <= EARLIER( STK[Index] ),
        REMOVEFILTERS()
    )