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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
PineTree
Regular Visitor

Properly Referencing Field Parameters in a Measure

Edit: I am trying to convert a string reference into a column reference within a measure. After some more refined research, I do not think what I want is possible.

I created a field parameter table "Parameter-WE Date" shown below:

PineTree_0-1698266860458.png

 

I have dozens of measures that reference the 'Calendar'[WE Date Sunday] but I need them to be dynamic and reference the result of the selected Field Parameter,  'Parameter-WE Date'[Parameter-WE Date_Fields]. 
Simply put in a DAX expression, I would like to have a measure like this:

Max WE Date = MAX('Parameter-WE Date'[Parameter-WE Date_Fields])

This doesn't work since the value returned into the max function is text.
Is there a simple, scalable way to call on the [Parameter-WE Date_Fields] and treat the result as a column rather than text?

 

Thanks in advance.
(edit for clarity)

2 REPLIES 2
amitchandak
Super User
Super User

@PineTree , Not very clear, but you can use [Parameter-WE Date_Order] to get selected value. refer

 

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

 

Power BI Field Parameters, Keep Axis Sort intact| Always Sort on X/Categorial Axis: https://youtu.be/GfBrB6czByw

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello @amitchandak , thank you for your response.
I made some minor edits to help with clarity.

To use the example you cited here to demonstrate my issue, lets first pretend 'Item'[Brand] and 'Item'[Category] are numeric values (maybe cost and revenue?). Now lets find the maximum value in 'Item'[Brand]/'Item'[Category] based on the Parameter selected by the user by creating a measure...
New Measure = Max('Parameter'[Parameter Fields])
This won't work because the value of 'Parameter'[Parameter Fields] is being treated as text and not as a column reference.
Do you know how to make [New Measure] work?
Does this provide enough clarity?

Thank you for your time @amitchandak 

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.