Forum Discussion
mbailey
Helper II
6 years agoMeasure to select 2nd row in sorted table?
Hi, I have a table that I want to sort by a date field, DESC, and then always use the 2nd row in that table in a Measure calculation. The purpose of this measure will be to return the percent_on_tim...
TomMartens
Super User
6 years agoHey mbailey ,
as the Power BI dataset does not know a sorted structure like an index, as we know this from relational databases. For this, you have to be aware that this can be quite slow. Basically, this is what you are looking for: You are looking for the record with the maximum date that is smaller than the current date.
Please provide a pbix that contains sample data but still reflects your data model, upload the pbix to onedrive to dropbox, and share the link. If you are using an Excel file to create sample data, share the xlsx as well.
Regards,
Tom