Forum Discussion

ahorne27's avatar
ahorne27
New Member
8 years ago
Solved

Accumulative values from a count

Hi All   I am struggling to plot data that accumulates the values from a count.   To illustrate what I am trying to do I have created the table in Excel   Item Name Cost Per Item x Number S...
  • v-chuncz-msft's avatar
    8 years ago

    ahorne27,

     

    You may also refer to the following DAX that creates a measure.

    Measure =
    VAR n =
        MAX ( Table1[Item Name] )
    VAR t =
        MAX ( Table1[Timestamp] )
    RETURN
        CALCULATE (
            SUM ( Table1[Cost Per Item x Number Sold] ),
            FILTER (
                ALLSELECTED ( Table1 ),
                Table1[Item Name] = n
                    && Table1[Timestamp] <= t
            )
        )