Forum Discussion

YMiranda's avatar
YMiranda
New Member
3 years ago
Solved

Help with cummulative totals

Hello, 

i've been trying to calculate a cummulative total within a date range  without any luck 

 

 

im trying to acchive something similiar to this (las column) 

 

1/31/202368,892.12Last Net Position181.75 a 68,892
1/31/2023-68,492.00Last Net Position181.70 a 400
1/31/2023-192.00Last Net Position180.95 c 208
1/31/2023-160.00Last Net Position179.40 b 48
1/31/2023-64.00Last Net Position177.90 Z -16
1/31/20230.00Last Net Position177.40d -16
 
 
CALCULATE(
    SUM('V__NetDaily'[s70]),
    FILTER(

        ALLSELECTED('DIM_TIME'[Date]),
        ISONORAFTER('DIM_TIME'[Date], MAX('DIM_TIME'[Date]), DESC)
    )  
)

 

 

 

 

thanks in advance

se les agradece toda su ayuda

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi YMiranda ,

    Please have a try.

    Add an index column in Power Query.

    Then create a measure.

    measure =
    CALCULATE (
        SUM ( table[pos] ),
        FILTER (
            ALL ( table ),
            table[index] <= SELECTEDVALUE ( table[index] )
                && table[nom] = SELECTEDVALUE ( table[nom] )
        )
    )
    

    Finally you can filter the pos column is not blank.

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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

     

     

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi YMiranda ,

    Please have a try.

    Add an index column in Power Query.

    Then create a measure.

    measure =
    CALCULATE (
        SUM ( table[pos] ),
        FILTER (
            ALL ( table ),
            table[index] <= SELECTEDVALUE ( table[index] )
                && table[nom] = SELECTEDVALUE ( table[nom] )
        )
    )
    

    Finally you can filter the pos column is not blank.

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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