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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
agolumeste
Frequent Visitor

Simple Excel task with DAX

Please help! How can I use DAX to solve a simple excel task!

I know the values in column A and the first Sum 1000 and need to calculate the Sum for each value in column A

    B           C
1 %       Sum
2 2,0%  1000
3 3,5%   965
4 3,0%   936,05

C3=C2-B2*C2

C4=C3-B3*C3 etc.

Thanks!

5 REPLIES 5
Anonymous
Not applicable

Is this calculation to be a calculated column or a measure?

Calculated column

amitchandak
Super User
Super User

@agolumeste , assume you have sequence in column A that can be used then try like

sumx(filter(Table, [A] =earlier([A]) -1),earlier([C]) - (earlier([C]) *earlier([B])))

or

sumx(filter(Table, [A] =earlier([A]) -1),([C]) - (([C]) *([B])))

 

or add an index column like

https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for help!

I can't use the EARLIER function because I calculate a column that doesn't exist yet.

Anonymous
Not applicable

In DAX you can't use recursion. Your formula is recursive. To calculate what you want it's best to use Power Query, where you CAN use recursion. If you really want to do it in DAX, you have to find a closed formula for the calculation. Yes, it's possible and not very hard; you just need some maths. If you can't find it, you can certainly find such a formula via Google or on Wolfram Alpha.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.