Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a measure that dynamically returns a chart title based on slicer selection.
Now I want to add to the measure a field parameter that will determine the chart title based on the slicer selections AND the field parameter selection. However, I get an error when trying to do so.
Is it even possible to implement what I'm trying to achieve? Appreciate any tips please @bhanu_gautam @lbendlin 🙂
Note: the field parameter is referencing measures only and for each of the measures referenced, they too are referencing other measures. Hope that makes sense.
Dynamic Chart Title =
VAR FieldParameter = SELECTEDVALUE('Ethnicity Filter'[Ethnicity Filter])
VAR Slicer1 = SELECTEDVALUE('Gender and Ethnic Pay'[Business Unit 1])
VAR Slicer2 = SELECTEDVALUE('Gender and Ethnic Pay'[Business Unit 2])
VAR ChartTitle =
IF(
ISBLANK(FieldParameter),
"ALL ETHNICITIES",
FieldParameter & " REPRESENTATION"
)
RETURN
SWITCH(
TRUE(),
ISBLANK(Slicer1) && ISBLANK(Slicer2), "MPI - " & ChartTitle & " by TENURE",
NOT ISBLANK(Slicer1) && ISBLANK(Slicer2), UPPER(Slicer1) & " - " & ChartTitle & " by TENURE",
NOT ISBLANK(Slicer1) && NOT ISBLANK(Slicer2), UPPER(Slicer2) & " - " & ChartTitle & " by TENURE"
)
//Field Parameter
Ethnicity Filter = {
("European", NAMEOF('Measures - General'[European Rate]), 0),
("Other Ethnicity", NAMEOF('Measures - General'[Other Rate]), 1),
("Asian", NAMEOF('Measures - General'[Asian Rate]), 2),
("Māori", NAMEOF('Measures - General'[Māori Rate]), 3),
("Pacific Peoples", NAMEOF('Measures - General'[Pacific Rate]), 4),
("MELAA", NAMEOF('Measures - General'[MELAA Rate]), 5)
}
the field parameter is referencing measures only and for each of the measures referenced, they too are referencing other measures. Hope that makes sense.
During troubleshooting you will want to keep it simple. Recommendation is to expand all measures and avoid nesting.
Hi @smithmpi,
Could you please share a pbix or some sample data that maintains the original data structure and expected results? This will help us clarify your situation and test the coding formulas.
Best regards,
Joyce
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 8 | |
| 8 |