Forum Discussion

tragonneau's avatar
tragonneau
Frequent Visitor
9 years ago
Solved

Problem with cumulation total when adding filters

Hello,   I have the following table : I have created this measure to have the cumulative total of the Qty : qty_cumul = CALCULATE( SUM(Stock[Qty]); FILTER( ALL(Stock[date]); Stock[d...
  • blopez11's avatar
    9 years ago

    Something similar to the following worked for me, but I needed a date table, where on my visual I used the month field from the date table for the axis, and I had a slicer that used year from the date table.  However, I haven't tried in DirectQuery mode

     

    Cumulative Quantity :=
    CALCULATE (
        SUM ( Transactions[Quantity] ),
        FILTER (
            ALL ( 'Date' ),
            'Date'[Date] <= MAX ( 'Date'[Date] )
        )
    )