cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Change Bex query as source to anothe Bex query with only name change

Hi Team,

@lmf232s 

We have a dashboard created with Bex Query(Test1) due to some complexity in this query we are planning to change the data source to Bex Query(Tes2) only the query name changes rest everything remains same . How to perform this and what are the precautions that need to be taken care ? and after publishing will there be any problem for refresh?

 

Regards,

Husna

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Resolver II
Resolver II

Re: Change Bex query as source to anothe Bex query with only name change

@HusnaBanu413 , 

 

What I typically do is create a new source/connection to the new report from the Power Query Editor. Once you've connected to the query (in power query) then I open the advanced editor and then I copy the m-script for both queries to notepad and compare then and update my primary query where needed. If you look at the image below the only things that could potentially change and need to be updated are in red. If the query is against the same data source then your Source (line3) will proably not need to be changed. Line 4 is the query name and that will need to be updated. You'll need to pay attention to the parameters and make sure that you're user the same type of parameters in the bex query, if not pay special attention and make the changes to lines 7 and 8 where needed. The last part will be the measures, make sure you look at those as (I beleive) measueres have a different value in each report. It may be the same measure in each report but I beleive that value of that measure when stored in the database gets a unique name that associates it with that query. So you'll want to look at those and make changes where necessary. 

 

However, If the queries are identical, same columns, same measures in (I believe in teh same order) then you should just be able to copy the m-script from the advanced editor of the new query and paste it into the primary query advanced editor screen and it should just work.

2020-03-26_8-14-48 2.png

 

View solution in original post

Highlighted
Community Support
Community Support

Re: Change Bex query as source to anothe Bex query with only name change

HI @HusnaBanu413,

As lmf232s said, you need to confirm these data sources have the same data structure first. (check query steps to fix not matched keys and fields if their structure not matches)

You can refer to the following links to know how to parameterize your report connection string or create a template file that can generate reports based on different connection strings:
Deep Dive into Query Parameters and Power BI Templates 

Using the Power BI Service Parameters to change connection strings (To possibly change between Dev  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Resolver II
Resolver II

Re: Change Bex query as source to anothe Bex query with only name change

@HusnaBanu413 , 

 

What I typically do is create a new source/connection to the new report from the Power Query Editor. Once you've connected to the query (in power query) then I open the advanced editor and then I copy the m-script for both queries to notepad and compare then and update my primary query where needed. If you look at the image below the only things that could potentially change and need to be updated are in red. If the query is against the same data source then your Source (line3) will proably not need to be changed. Line 4 is the query name and that will need to be updated. You'll need to pay attention to the parameters and make sure that you're user the same type of parameters in the bex query, if not pay special attention and make the changes to lines 7 and 8 where needed. The last part will be the measures, make sure you look at those as (I beleive) measueres have a different value in each report. It may be the same measure in each report but I beleive that value of that measure when stored in the database gets a unique name that associates it with that query. So you'll want to look at those and make changes where necessary. 

 

However, If the queries are identical, same columns, same measures in (I believe in teh same order) then you should just be able to copy the m-script from the advanced editor of the new query and paste it into the primary query advanced editor screen and it should just work.

2020-03-26_8-14-48 2.png

 

View solution in original post

Highlighted
Community Support
Community Support

Re: Change Bex query as source to anothe Bex query with only name change

HI @HusnaBanu413,

As lmf232s said, you need to confirm these data sources have the same data structure first. (check query steps to fix not matched keys and fields if their structure not matches)

You can refer to the following links to know how to parameterize your report connection string or create a template file that can generate reports based on different connection strings:
Deep Dive into Query Parameters and Power BI Templates 

Using the Power BI Service Parameters to change connection strings (To possibly change between Dev  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Change Bex query as source to anothe Bex query with only name change

Thank you @lmf232s  

Helpful resources

Announcements
June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors