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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors