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
oliverblane
Helper III
Helper III

Add new column using values from the next row of the table filtered to match condition

I have a table that looks like the first three columns of the following:

oliverblane_0-1638800772186.png

The final column is what I would like to produce. The value for this column should be calculated as follows:

  • Filter the table to check if the table contains any other rows with the same Role ID as the current row
  • If there is more than one row in this filtered table, order the filtered table by Review Date and fetch the next Review Date in the filtered table. This should become the Actual Next Review Date
  • If it is the last row in the filtered table after ordering by Review Date, then the Actual Next Review Date should remain blank.

 

Apologies for the confusing title - I hope the example gives more context to what I am trying to do!

 

Thank you for any help on this.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@oliverblane ,

 

New column = minx(filter(Table, [Role ID] = earlier([Role ID])  && [next Review Date] > earlier([next Review Date]) ) ,[next Review Date] )

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@oliverblane ,

 

New column = minx(filter(Table, [Role ID] = earlier([Role ID])  && [next Review Date] > earlier([next Review Date]) ) ,[next Review Date] )

This works perfectly, thank you so much!

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.

Top Solution Authors