Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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
User | Count |
---|---|
12 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
27 | |
19 | |
13 | |
11 | |
7 |