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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.