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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
busybee
Helper I
Helper I

Parameters

I have a Power BI file and have imported an Excel file using Edit Queries. I created 2 new parameters. When I try to create a function to dynamically change the parameter value on the Excel sheet I imported, Power BI says the Sheet does not reference any parameters. Any suggestions on how to resolve this?

1 ACCEPTED SOLUTION
edhans
Community Champion
Community Champion

You are missing a step between 4 and 5.

 

Creating parameters doesn't put them in a query. You have to reference the parameters in the query. So to test this, assume your parameters are numbers, and one is called parTestValue. Create a custom column that is =[SomeNumericColumn] * parTestValue

 

Now you can right-click on the query and create a function. It will only be using the parameter(s) you are explicitly using in the query.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

4 REPLIES 4
edhans
Community Champion
Community Champion

Power BI/Power Query cannot change data on an external source, which is what it sounds like you are trying to do. If that is not the case, can you be more specific and perhaps provide a PBIX file as an example?



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

I took the following steps.

1) Create a new .pbix file. 

2) Open Query Editor using Edit Queries

3) Choose New Source as an Excel file and then import it.

4) A query named Sheet1 is created.

4) Click on Manage Parameter-New Parameter and create 2 new parameters.

5) Now when I right click on Sheet1 and click Create Function..., Power BI says the query Sheet1 does not reference any parameters. 

How do I resolve this? I want to create a function that utilizes the 2 parameters I created when invoked? 

edhans
Community Champion
Community Champion

You are missing a step between 4 and 5.

 

Creating parameters doesn't put them in a query. You have to reference the parameters in the query. So to test this, assume your parameters are numbers, and one is called parTestValue. Create a custom column that is =[SomeNumericColumn] * parTestValue

 

Now you can right-click on the query and create a function. It will only be using the parameter(s) you are explicitly using in the query.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Thanks. That solution worked. 

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.

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.