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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
aghonaim
Most Valuable Professional
Most Valuable Professional

How to reference a parameter to a DAX function ?

Is it possible to reference a parameter to a DAX function and how ?

1 ACCEPTED SOLUTION
aghonaim
Most Valuable Professional
Most Valuable Professional

It's a nice workaround, thanks!

View solution in original post

8 REPLIES 8
Mfd
New Member

It is possible through multiple steps, 2 possibilites exist depending on the volume of your tables 

 

1. Use powerquery and merge your table with the parameter. The parameter will repeat on every line. You can then use it through calculations directly in powerquery, or with DAX. 

 

Parameter 1 : 0,5


Vendor

John 1
John 2
John 3

With an outerleft join, 

VendorParameter 1
John 10,5
John 20,5

 

2. If your data has high volume, reference the parameter on your fact table using power query. like in example 1 

In your 2nd table, use DAX and reference the value 

LOOKUPVALUE( 'Infotable'[Parameter1], Info table[Vendor name]>, 'Currenttable'[Vendor] )

 

This will return the parameter 0,5 to every line, and can then be used for calculations using DAX

 

Anonymous
Not applicable

Where can we use these paramters once created? I can't find any way to use them.

ankitpatira
Community Champion
Community Champion

@aghonaim In power bi desktop go to query editor -> right click your parameter and ensure Enable Load is checked. Then Parameters are just like any other query in Power BI Desktop and so you can reference them in DAX expressions.

 

Capture.JPG

aghonaim
Most Valuable Professional
Most Valuable Professional

Assume I want to create a cacluated column that multiply column "A" in Table 1 by the paramater "Pam". I got this error:

 

Power BI.png

Hi @aghonaim,

In Power BI Desktop, we are not able to use Parameters in calculated columns.  Regarding to this issue, you can vote it in the following existing idea.

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/12891723-parameters-calculated-fi...


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
aghonaim
Most Valuable Professional
Most Valuable Professional

OK I did vote, thanks!

Anonymous
Not applicable

Create a query new blank query and type = MYPARAMETER, 

Than you can reference in columns/dax

aghonaim
Most Valuable Professional
Most Valuable Professional

It's a nice workaround, thanks!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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