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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Dan_S
Frequent Visitor

Loading data - function define source

Hello, I don't know how to solve the problem that I described below.

 

I'm loading data from SQL Server and I'm having a problem when loading this data through a gateway in an online environment.

 

  1. First, I use a select statement to retrieve data from the SQL database
  2. Then I create a list of values from it
  3. Next I use a function to generate a source query to the other SQL database, which includes a "where in" statement based on the list of values
  4. In the desktop version, everything works fine, but in the online environment, I can't perform the update

The purpose is not to load all data from SQL database and then use filter but only get the data that interests.

 

I have all in new version.

Can sameone help me solve this problem?

 

Thank you very much

Dan

 

2 REPLIES 2
Dan_S
Frequent Visitor

Oh, thank you. Dint know about back folding to the server. Thank you

BA_Pete
Super User
Super User

Hi Dan,

 

For starters, your method of reducing data in Power BI is incredibly inefficient. You can import your first SQL data into Power Query then perform the transformations you need and these will fold back to the server, so won't ever actually bring in all the data.

Once you have your first list (Table1), you should just be able to buffer Table1[ListColumn] and send it to the second DB within the folded native query by using a table filter something like this:

Table.SelectRows(
    Table2PreviousStep,
    each List.Contains(List.Buffer(Table1[ListColumn]), [Table2FilterColumn])
)

 

Secondly, when you say "in the online environment, I can't perform the update", what does this actually mean? Do you get a processing error? An authentication error? Nothing happens? Etc.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors