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

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.

Reply
Anonymous
Not applicable

Using results of one query to feed another query - over 1000

I have a query, let's call it query A that runs on server A. I use the results from query A to pull data using query B on server B. The two servers dont' communicate (server A is Microsoft SQL Server, server B is Oracle). I followed the steps outlined in this post: https://community.fabric.microsoft.com/t5/Desktop/Using-results-of-one-query-to-feed-another-query/t... and it worked perfectly in testing a small number of results from query A. However, when I expand to over 1000 results from query A I receive error ORA-01795 on query B because the number of results from query A is more than oracle allows in the WHERE clause.

 

In theory I need to split my results from query A into groups of 1000 and update the WHERE clause in query B to say "where results in (1,2,3,...,1000) or results in (1001,1002,1003,...,2000)" etc. Of course this needs to be dynamic since the number of results will grow over time. The problem is I'm not sure how to do that in Power BI. Is it possible?

 

TIA

Rich

2 REPLIES 2
SivaMani
Resident Rockstar
Resident Rockstar

@Anonymous, If your filter column is not text and continuous value, you could try using BETWEEN minValue and MaxValue, let's say WHERE results BETWEEN 1 and 1000.

Anonymous
Not applicable

Thanks for replying. I forgot to mention that my filter column is text. 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Kudoed Authors