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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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