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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Calling a constant

Hi Pros,

 

I'm really new to Power BI (how manny times have you heard that :)) and am really loving the tool.

I have encountered an issue that I am unable to find a solution for - probably because I am asking it incorrectly (don't know all the tecjnical jargon). 🙂

I have built a 'project' with various visualization graphs to display my monthly stats. I am calling my data from CSV files and have just noticed that one of my values (Target) is actually a constant value and repeated in most of my source CSV files.

If I put that value in another global/parameter file, how can I call the value from the respective queries that I have built so far?

 

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION
SteveCampbell
Memorable Member
Memorable Member

In Power Query, you can add this to a Parameter

https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/

 

If you write a query that returns a single value, you can right click > Convert to parameter

 

You can call the parameter in files by simply typing the name. Note it the name of the parameter has spaces, you'll need the syntax:

#"Parameter with Space"

If you start typing though, intellesense should pick it up. I recommend reading the docs to familiarize with Parameters.

 

They can be used in Functions, or custom columns etc. 
https://radacad.com/custom-functions-made-easy-in-power-bi-desktop

 

Appreciate your Kudos
Connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



View solution in original post

2 REPLIES 2
SteveCampbell
Memorable Member
Memorable Member

In Power Query, you can add this to a Parameter

https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/

 

If you write a query that returns a single value, you can right click > Convert to parameter

 

You can call the parameter in files by simply typing the name. Note it the name of the parameter has spaces, you'll need the syntax:

#"Parameter with Space"

If you start typing though, intellesense should pick it up. I recommend reading the docs to familiarize with Parameters.

 

They can be used in Functions, or custom columns etc. 
https://radacad.com/custom-functions-made-easy-in-power-bi-desktop

 

Appreciate your Kudos
Connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Anonymous
Not applicable

Thanks so much Steve.

By adding a new column and 'linking' it to my parameter as explained in https://radacad.com/custom-functions-made-easy-in-power-bi-desktop I was able to resolve my issue.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.