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
campelliann
Post Patron
Post Patron

Placing a Query on Power BI service (data flow?)

Hi,


I have a query that must be used in several PBI files, and I am copying the query between them. The thing is that when this query needs to change, I dont want to have to change it in every file.

I believe there is a way to use power query on the power bi service, and to use this query in the sources? Can anyone give me a direction please? I believe this is where dataflows enter but I have not managed to apply it.

Thanks,

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @campelliann ,

 

Is this query being changed when you do a new file or is it always the same? Are you adding new measures and creating new calculations or repeating the same ones?

 

If your query is always the same you can do one of two things:

  1. Create a blank report with only that query and make use of Power BI dataset (https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-report-lifecycle-datasets)
    1. The use of this type of datasets is good because you can have an all model with relationship measures and so on that you reuse everytime you need.
  2. Create a dataflow and add the query in this case you need to follow this link  and then create a blank query and using the advance editor copy the code from your query,

Be aware that the use of dataflows does not allow for use of local files you need to have the information online.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @campelliann ,

 

Is this query being changed when you do a new file or is it always the same? Are you adding new measures and creating new calculations or repeating the same ones?

 

If your query is always the same you can do one of two things:

  1. Create a blank report with only that query and make use of Power BI dataset (https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-report-lifecycle-datasets)
    1. The use of this type of datasets is good because you can have an all model with relationship measures and so on that you reuse everytime you need.
  2. Create a dataflow and add the query in this case you need to follow this link  and then create a blank query and using the advance editor copy the code from your query,

Be aware that the use of dataflows does not allow for use of local files you need to have the information online.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.