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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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] )

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

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] )

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

This works perfectly, thank you so much!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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