Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Substract from previous row and keep it in same column

Delion_0-1617081096713.png

 

Hi I have question how to substract from previous row and input it in current row and for the 1st row we have 1,000,000 as starting value

 

Thank

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

You can create two measures as below to achieve it:

 

FORECAST REDUCER = SUM('Table'[PRODUCTIVITY])*SUM('Table'[PEOPLE])*30
FORECAST = 
VAR _tab =
    SUMMARIZE (
        'Table',
        'Table'[DATE],
        "Forecast",
            1000000
                - SUMX (
                    FILTER ( ALL ( 'Table' ), 'Table'[DATE] <= SELECTEDVALUE ( 'Table'[DATE] ) ),
                    [FORECAST REDUCER]
                )
    )
RETURN
    SUMX ( _tab, [Forecast] )

 

yingyinr_0-1617244457992.pngBest Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

You can create two measures as below to achieve it:

 

FORECAST REDUCER = SUM('Table'[PRODUCTIVITY])*SUM('Table'[PEOPLE])*30
FORECAST = 
VAR _tab =
    SUMMARIZE (
        'Table',
        'Table'[DATE],
        "Forecast",
            1000000
                - SUMX (
                    FILTER ( ALL ( 'Table' ), 'Table'[DATE] <= SELECTEDVALUE ( 'Table'[DATE] ) ),
                    [FORECAST REDUCER]
                )
    )
RETURN
    SUMX ( _tab, [Forecast] )

 

yingyinr_0-1617244457992.pngBest Regards

lbendlin
Super User
Super User

Use the List.Accumulate function.  You need some sort of an index column that makes each row unique and sortable.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.