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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
jmeelisfab
Regular Visitor

Creating parameters from query within a refresh to input in other query

Hi, 

 

I am trying to refresh a query using parameters created from another query.
I want to know if it is possible to sequentially refresh in the following order:

1. Refresh Query 1 that inlcudes ID

2. Create parameters including distinct ID's from Query 1

3. Refresh Query 2 using these parameters as inputs

 

I am asking because of data limitations for Query 2. It takes too long to load Query 2 without filtering for these specific ID's.

 

P.S. I only have 3 months experience in Power BI / Power Query.

 

 

2 REPLIES 2
watkinnc
Super User
Super User

If it's Excel, you could set the first query to refresh upon opening, and then refresh the rest. I do it like that when grabbing usernames to filter my tables.

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!
Vijay_A_Verma
Super User
Super User

You will need to click a query in Queries pane and press Refresh preview in Home menu. Hence, refresh Query1 first and then Query 2. 

Don't select Refresh All.

But all these will impact only Preview data limited to 1000 rows.

When you apply, queries are executed fully not only limited to 1000 rows of preview, then you can't select the order of Queries to be executed. In File - Options & Settings - Current File - Data Load - You can uncheck Parallel Loading. This will cause Queries to be executed sequentially (But you can't define the order)

 

Watch below video where a delay has been introduced through Function.InvokeAfter which might help you.

Power BI - Custom Query Load Order

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors