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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mnhamermesh
Frequent Visitor

Field Parameter Selected value inside of a DAX formula

I have built a dynamic chart utilizing the the field parameter feature where users can select between Year, Quarter, and Month on the X axis and choose different measures for both the bar and line chart.

 

mnhamermesh_4-1665709710206.png

mnhamermesh_5-1665709922337.png

 

In the first example above the secondary axis scale does not align to the primary axis but should as I need the user to compare the two metrics on the same scale.  I know I can set the axis to the same range, but the secondary axis is also using a field parameter with the option to change from an absolute number to a percentage as shown in example 2.  To solve for this issue I wanted to create a DAX measure that calculates the maximum value for each field parameter measure (primary / secondary Y axis) grouped by the Dynamic_Date_Contract parameter and then choose when to apply the same max value based on the selected measures parameter.

 

I've tried to use the following measure to tackle the first part of the problem but this does not properly group the measures and when breaking down the values(Dynamic_Date_Contract[Dynamic_Date_Test Fields]) I'm only shown the filed name and not the underlying values

 

Dynamic Measure Max = IF(
	countrows(values(Dynamic_Date_Contract[Dynamic_Date_Test Fields])) = 1, 
	[Dynamic_Measure], 
	MAXX(
		values(Dynamic_Date_Contract[Dynamic_Date_Test Fields]), 
		[Dynamic_Measure]
	)
)

 

mnhamermesh_6-1665710936352.png

 

Is there a way to get a list of the underlying values from the field parameter to work inside of a DAX calc to then determine the max value across the subset?  If I'am able to do this for both dynamic measures then I can determine when to set the secondary axis to the same maximum scale value and when to keep the maximum scale values separated. 

4 REPLIES 4
Mohammedhassan
Regular Visitor

I need to know if you find a solution for that problem as I'm stuk at the same point and couldn't get the underlying values inside the field parameter. I hope you could find a solution.

amitchandak
Super User
Super User

@mnhamermesh , Based on what I gor, You can refer

Selected Measure = maxx(filter(Measure ,Measure[Measure Order] = SELECTEDVALUE(Measure[Measure Order])), Measure[Measure])

 

 

Also the measure I disucssed at last can help you in above

https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak, Thank you for the response!  I'm not sure the proposed solution solves my problemm.  Below is a bit more detail.

 

If I were to create a bar chart with no dynamic capabilities I could create a Dax measure to identify what the max value is within the data group (i.e. x-axis) used in the chart, below is an example:

mnhamermesh_0-1665724853553.png

 

Note the non dynamic Dax calculation shows the maximum of the measure values by the column Usage_FYQtr 89MM).  I could then use this measure as a maximum value for the Y-Axis ranges.

 

mnhamermesh_1-1665725720639.png

 

 

If I were to change the Dax calculation to the Field Parameter with Date (Year,Qtr, Month) then my ability to determine the max of the measure disappearss.

 

Being able to display the selected value for the field parameters is nice, but doesn't provide the underlying values the parameter references which is what I'm after.  I could create a Dax measure for each variation of the Date parameter, but was hoping I could avoid doing this as I have other charts where there's a lot more than 3 options

 

Anonymous
Not applicable

@mnhamermesh were you able to solve this?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors