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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to limit the number of rows from a DB data source

I've searched for an answer and can't find one.

 

In Desktop, I have added a fact table to my list of data sources. The table contains >3M rows by 272 columns. I'd like to get just the most recent records. I tried creating a new query, but it won't return anything. I'm using Oracle as the data source. This is the query I tried just to see if I could get fewer than 3M rows, but need to use the current date as the filter.

 

select ln_record_type, cost_cntr from cpxxdm.ln_cpxxdm_daily where rownum <= 5000 ---- wasn't sure if I needed the semi-colon, so tried with and without to no avail.

 

Thank you.

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

When you create a data source connection string, you can input the Oracle query meanwhile to filter returned records.

1.PNG

 

To ensure the query is correct, please run it in Oracle DB first.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

When you create a data source connection string, you can input the Oracle query meanwhile to filter returned records.

1.PNG

 

To ensure the query is correct, please run it in Oracle DB first.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.