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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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 III
Resolver III

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 III
Resolver III

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors