Forum Discussion

Swizal's avatar
Swizal
Frequent Visitor
2 years ago
Solved

Rolling balance

Hello Fellow Analysts,

I have a issue with the rolling balance row as shown in the picture. i want the balance( a measure) to become cumulative in the rolling balance row. In March 2024 it should show 8796, april 2024- 17235 (8796+8439) and so on. I cant unpivot the table to achieve this. Any other ideas on how this can work?

  • Hi, Swizal 

    try below measure

    Measure = 
    SUMX(
        FILTER(
            ALL('Table'[Dtae],'Table'[Value],'Table'[Name],'Table'[Supplier Line]),
            'Table'[Dtae]<=MAX('Table'[Dtae]) && 
            'Table'[Name]=MIN('Table'[Name])  &&
            'Table'[Supplier Line]=min('Table'[Name])
        ),
            [Value]
    )

     

    Best Regards,

    Dangar

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Dangar332's avatar
    Dangar332
    Resident Rockstar

    Hi, Swizal 

    Try below measure 

    Measure = 
    SUMX(
        FILTER(
            ALL('Table'),
            'Table'[Dtae]<=MAX('Table'[Dtae])
        ),
            [Value]
    )

     

    Best Regards,

    Dangar

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Swizal's avatar
      Swizal
      Frequent Visitor

      Hi Dangar332 ,

      Thankyou for your inputs. It may seem that there is only one context of date ,except ,there is another context of the supplier. and a few more slicers like (line item, planner name) which comes into play. Please find the below snippet of the same.

      • Dangar332's avatar
        Dangar332
        Resident Rockstar

        Hi, Swizal 

        try below measure

        Measure = 
        SUMX(
            FILTER(
                ALL('Table'[Dtae],'Table'[Value],'Table'[Name],'Table'[Supplier Line]),
                'Table'[Dtae]<=MAX('Table'[Dtae]) && 
                'Table'[Name]=MIN('Table'[Name])  &&
                'Table'[Supplier Line]=min('Table'[Name])
            ),
                [Value]
        )

         

        Best Regards,

        Dangar

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.