Forum Discussion

OKgo's avatar
OKgo
Icon for Helper IV rankHelper IV
8 years ago
Solved

Cummulative sum visible in edit queries

Within PowerBi is there a way to have a cumulative total visible in the edit queries screen?   This is how I would tackle this in Excel. Sort by "unique' then by "date", simple IF formula: t...
  • v-yulgu-msft's avatar
    8 years ago

    Hi OKgo,

     

    To get a cumulative total column, please try:

    Running total Col =
    CALCULATE (
        SUM ( 'Table1'[Value] ),
        FILTER (
            ALLEXCEPT ( 'Table1', 'Table1'[unique] ),
            Table1[Date] <= EARLIER ( Table1[Date] )
        )
    )

     

    To create a running total measure, please refer to:

    Running total measure =
    CALCULATE (
        SUM ( Table1[Value] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[unique] ),
            Table1[Date] <= MAX ( Table1[Date] )
        )
    )

     

    Best regards,

    Yuliana Gu