Forum Discussion

AnetaK's avatar
AnetaK
Helper V
5 years ago
Solved

Running Total (based on projects)

Hello, I need help in creating a Running Total measure, but what is important - it should be based on projects, not dates. Usually, Running Total is created by date, we start in January and increas...
  • AnetaK's avatar
    5 years ago

    I've found a sulution (article i Polish).

    It was so simple... <facepalm>

     

    Cumulative Total =
    VAR total_sales = [Total Sales]
    RETURN
        IF (
            NOT ( ISBLANK ( total_sales ) ),
            CALCULATE (
                [Total Sales],
                FILTER ( ALLSELECTED ( Sales[Product] )total_sales <= [Total Sales] )
            )
        )

     

    https://cwiok.pl/index.php/pl/2019/06/02/skumulowana-suma-po-produktach-w-daxie/