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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

how to have the product of a previous row stored in the following row

How do I create a calculated column that accomplishes the same transformations as the transformation shown in the Excel Example?

 

Excel ExampleExcel Example

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Is there only one value in column K currently? You can try this column expression

Column = 
var _firstK=MAXX(FILTER(ALL('Table'),'Table'[K]<>BLANK()),'Table'[K])
var _sumH=SUMX(FILTER(ALL('Table'),'Table'[Index]<=EARLIER('Table'[Index])),'Table'[H])
var _sumI=SUMX(FILTER(ALL('Table'),'Table'[Index]<=EARLIER('Table'[Index])),'Table'[I])
var _sum=_firstK-_sumH+_sumI
return _sum

result

vxiaotang_0-1654740085064.png

Best Regards,

Community Support Team _Tang

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

View solution in original post

1 REPLY 1
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Is there only one value in column K currently? You can try this column expression

Column = 
var _firstK=MAXX(FILTER(ALL('Table'),'Table'[K]<>BLANK()),'Table'[K])
var _sumH=SUMX(FILTER(ALL('Table'),'Table'[Index]<=EARLIER('Table'[Index])),'Table'[H])
var _sumI=SUMX(FILTER(ALL('Table'),'Table'[Index]<=EARLIER('Table'[Index])),'Table'[I])
var _sum=_firstK-_sumH+_sumI
return _sum

result

vxiaotang_0-1654740085064.png

Best Regards,

Community Support Team _Tang

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors