Forum Discussion

chaitanya1's avatar
chaitanya1
Icon for Helper I rankHelper I
1 year ago
Solved

Custom Column for Cummulative TR in power query

let // Load the Serviceable Feeder table ServiceableFeeders = ServiceableFeeder, // Load the Master Address List (2) table with MonthsSinceGoLive MonthsTable = QuartersSinceLiveSeries, // Add a ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi chaitanya1 ,

     

    Please try like:

    Cumulative TR = 
    VAR __curr_index = 'Table'[Index]
    VAR __result = CALCULATE(SUM('Table'[TR]), FILTER(ALL('Table'), 'Table'[Index] <= __curr_index))
    RETURN
        __result

    or:

    Cumulative TR = 
    VAR __curr_index = 'Table'[Index]
    VAR __result = CALCULATE(SUM('Table'[TR]),  'Table'[Index] <= __curr_index, ALLEXCEPT('Table','Table'[Index]))
    RETURN
        __result

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum