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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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

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

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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