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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cniemann88
New Member

Shared Parameters

Hello, 

I am trying to share parameters across different queries. Queries are split up into different groups for usablity.

The queries i need to write are very similar, so i am trying to copy/paste them and change a few things as needed. 

 

Problem: When i paste all queries from a group into another, PBI adds copies of all used parameters, and overwrites the original parameters in the copied queries with the new parameter names (e.g. Parameter becomes Parameter (2) .

Question: Is there a way to force PBI to not make copies of the parameters, and just keep using the same as the original (similar to $ in excel) ? 

 

Thanks!

1 ACCEPTED SOLUTION

To circle back...i found that A solution would be to use the functions. You can generate a custom table, that contains all the variables for the function, for any of the scenarios needed. Then you can add a column as an invoked function. You can add as many functions as needed this way, as long as the parameters dont change. 

Once everything is evaluated, you can start manipulating the data to show what you need in the end.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@cniemann88 take your original query, and click advanced editor, copy the script,

 

start blank query, click advanced editor and paste the code, and from there you can make the changes to your new table.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hey, Thanks for the reply. 

I am aware of that solution. I was hoping there was another option, right now i would have to do this 72x6 times, which would leave a lot of room for typos in the end...

 

Is there any other way to accomplish this? 

To circle back...i found that A solution would be to use the functions. You can generate a custom table, that contains all the variables for the function, for any of the scenarios needed. Then you can add a column as an invoked function. You can add as many functions as needed this way, as long as the parameters dont change. 

Once everything is evaluated, you can start manipulating the data to show what you need in the end.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.