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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Kev74
Frequent Visitor

Get the previous value of calculated column

I am stucked in a problem during a few days, 

 

So my problem is I want to retrive the data of the previous row of my same calculated column, but the problem If i create an another column and make LOOKUP in order to retrive the previous row and with this same column to retrive the current row , I will get a circular error dependancy... 

 

I don't have any ideas how to ride about this problem ?

 

 

 

This is the problem in Excel to better understand (I want make the same thing than N column) :

 

Kev74_0-1689939521690.png

 

If you want more details, please say me, thanks you

 

1 ACCEPTED SOLUTION
AlanFredes
Resolver IV
Resolver IV

Hi Kev,

The EARLIER DAX function can help you with this. You will also need to create a numeric Index column.
In the below example, you can see I can calculate the cumulative sum of the row using the EARLIER function. You can change this aggregated function to find MAX, MIN or AVERAGE of the list up until the row you are on.

AlanFredes_0-1690062710812.png

Did I answer your question? Mark my post as a solution!

View solution in original post

1 REPLY 1
AlanFredes
Resolver IV
Resolver IV

Hi Kev,

The EARLIER DAX function can help you with this. You will also need to create a numeric Index column.
In the below example, you can see I can calculate the cumulative sum of the row using the EARLIER function. You can change this aggregated function to find MAX, MIN or AVERAGE of the list up until the row you are on.

AlanFredes_0-1690062710812.png

Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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