Skip to main content

Power BI

Needs Votes

filter last x records

Vote (5) Share
's profile image

on 21 Nov 2015 13:24:42

I would like an option for filtering that allows me to choose the last “x” number of records. So if every week a new data point is recorded in the data set, once the tables have been refreshed, all of my visualizations would drop off a prior week’s data and add the new week’s data.

Comments (2)
's profile image Profile Picture

Chuck Roberts on 11 Oct 2022 11:00:43

RE: filter last x records

PBI also has an Age transformation. After adding a new column which is an age based on one of your date fields, then you would remove all records where age is greater than 8.

's profile image Profile Picture

Chuck Roberts on 11 Oct 2022 10:58:52

RE: filter last x records

If you are querying a database, you need to set your source S.Q.L to get only last N records or get only records by date. So when you do a refresh, only the most recent records are loaded. Most S.Q.L databases have a function for today's date which allows you to calculate the age of a record, which allows you get only records that are less than 8 days old.