Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I have a database that i load in power bi and i want to work just by the 60 last lines of table.Please how to do it? Thanks in advance.
Side note, in M, you can use Table.LastN library function.
In query editor:
Depends on how you want the data from database to Power BI and if want to load only the last 60 rows or load all rows by work with only the last 60 rows. assuming it is latter one, One approach will be to add a sequnce column to the db tbale import query as shown below (oracle syntax).
select (rownum - (select count(1) from <tablename>) + 60) as rowseq, tbl.* from <tablename> tbl
Once the data is imported, you could then filter the table in powerbi on the column named "rowseq" to greate than 0.
you could also apply this column filter on reports if you so desire.
If you do not want to everload more than last 60 lines - i would suggest filtering out in the db query itself.
Hope this helps.
| User | Count |
|---|---|
| 50 | |
| 37 | |
| 31 | |
| 22 | |
| 19 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 60 | |
| 36 | |
| 35 |