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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.