Forum Discussion
rdg515
Resolver I
4 years agoParameter: Fields selected value
I want to create a measure that references the selected value from a paramater table (create new parameter, select fields). I will show you the way I did it below, but I'm looking for an improvement ...
v-kkf-msft
Community Support
4 years agoHi rdg515 ,
Please try the measure.
Selected Survey Avg Rating =
SWITCH (
SELECTEDVALUE ( prmSurveyResponses[prmSurveyResponses Fields] ),
NAMEOF ( 'Service Survey'[NPSResponseCode] ), [NPS Avg Rating],
NAMEOF ( 'Service Survey'[CustomerEffortResponseCodeText] ), [Customer Effort Avg Rating],
NAMEOF ( 'Service Survey'[ProductCompetitionResponseCodeText] ), [Product Competition Avg Rating]
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years agoNot applicable
Here is a more universal solution.
Selected Parameter = VAR SearchString = SELECTEDVALUE('Field Parameters'[Parameter]) VAR LeftBound = SEARCH("[",SearchString) VAR RightBound = SEARCH("]",SearchString) RETURN MID(SearchString,LeftBound + 1,RightBound-(LeftBound+1))- Gibby_ngam1 year agoFrequent Visitor
This works if you only want the text, not the measure 🙂. This is perfect for me since I only want the display text, not the measures
- avisingh1 year ago
Advocate IV
Actually this does not work at all.
SELECTEDVALUE('Field Parameters'[Parameter])
Always returns the error as below:
"Column [Parameter] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression."