Forum Discussion
SELECTEDVALUE on Field Parameter VALUE, not COLUMN
I saw this article that explains how to use SELECTEDVALUE() with Field Parameter, to get the Column name currently being selected. But I am looking for a way to get the Value in the column itself, not the column name. For example,
| ColumnName |
| Val1 |
| Val2 |
| Val3 |
I want to retrieve the Val1/Val2/Val3 that is currently being selected in the context. Can this be done?
I know it is doable with SWITCH() statement to the original column (not the field parameter table), but my field parameter have close to 20 fields included, so I don't want to hard-code everything if possible.
Hi — in Power BI field parameters don’t expose a “give me the current row value of the selected column” function.
SELECTEDVALUE() on the parameter table can tell you which field (name) is selected, but DAX cannot dereference a column reference dynamically and return its value (there’s no “dynamic column pointer” you can evaluate). So if you want Val1/Val2/Val3 from whichever column is selected, you’re basically limited to one of these patterns:
Option 1 (most common): SWITCH mapping
Yes, it’s the standard answer: map the selected parameter item to the underlying column/measure using SWITCH().Option 2 (cleaner at scale): use Measures in the field parameter + a Calculation Group
Instead of putting columns in the field parameter, create measures (one per field) and build the parameter on those measures. Then use a calculation group with SELECTEDMEASURE() to apply common logic without repeating it 20 times. This reduces hard-coding and is much more maintainable.Bottom line:
➡️ No, you can’t directly retrieve the selected column’s value from a field parameter without mapping (because DAX doesn’t support dynamic column evaluation).
➡️ For 20+ fields, the best practice is field parameters over measures + calculation groups, or fall back to a SWITCH().If you share whether those 20 fields are numeric measures or text columns, I can suggest the cleanest structure (and a template that avoids repeating logic).
Hi sahabatsuria
Field parameters are not actual columns; they only function as selectors for columns or measures. It isn’t possible to dynamically display the values of the selected column directly from a field parameter slicer. Those values can only be shown in visuals such as tables, matrices, or other visuals that have row context. To display different values based on the field parameter selection (in a card or similar visuals), the appropriate approach - which you have already mentioned - is to use a SWITCH expression that responds to the slicer selection.
7 Replies
- mohit_sakhareResolver II
Hi — in Power BI field parameters don’t expose a “give me the current row value of the selected column” function.
SELECTEDVALUE() on the parameter table can tell you which field (name) is selected, but DAX cannot dereference a column reference dynamically and return its value (there’s no “dynamic column pointer” you can evaluate). So if you want Val1/Val2/Val3 from whichever column is selected, you’re basically limited to one of these patterns:
Option 1 (most common): SWITCH mapping
Yes, it’s the standard answer: map the selected parameter item to the underlying column/measure using SWITCH().Option 2 (cleaner at scale): use Measures in the field parameter + a Calculation Group
Instead of putting columns in the field parameter, create measures (one per field) and build the parameter on those measures. Then use a calculation group with SELECTEDMEASURE() to apply common logic without repeating it 20 times. This reduces hard-coding and is much more maintainable.Bottom line:
➡️ No, you can’t directly retrieve the selected column’s value from a field parameter without mapping (because DAX doesn’t support dynamic column evaluation).
➡️ For 20+ fields, the best practice is field parameters over measures + calculation groups, or fall back to a SWITCH().If you share whether those 20 fields are numeric measures or text columns, I can suggest the cleanest structure (and a template that avoids repeating logic).
- Ritaf1983Super User
Hi sahabatsuria
Field Parameter is not a standard column; it essentially acts as a pointer to the underlying column or measure it references.
If your goal is simply to display the data in a visual (like a table or a chart), the Field Parameter handles this automatically out-of-the-box without the need for additional DAX.
Typically, using SELECTEDVALUE() in this context is only necessary when you need to trigger specific logic—for example, in conditional formatting or creating highly dynamic titles.
To provide a more efficient solution and help you avoid hard-coding 20 different conditions in a SWITCH() statement, could you please clarify your specific use case? What exactly are you trying to achieve with the retrieved value?
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- cengizhanarslanSuper User
Why cant you simply use that column as a Slicer? You can dynamically choose whichever row context by using that.
- Kedar_PandeSuper User
Selected Value =
VAR ParamName =
VAR SelCols = SUMMARIZE('Field Param'[Field Param], 'Field Param'[Field Param])
RETURN IF(COUNTROWS(SelCols)=1, MAXX(SelCols, 'Field Param'[Field Param]))
VAR Result =
SWITCH(ParamName,
"Col1", SELECTEDVALUE(Table[Col1]),
"Col2", SELECTEDVALUE(Table[Col2]),
-- add your 20 fields
BLANK()
)
RETURN Result
If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande - danextianSuper User
Hi sahabatsuria
Field parameters are not actual columns; they only function as selectors for columns or measures. It isn’t possible to dynamically display the values of the selected column directly from a field parameter slicer. Those values can only be shown in visuals such as tables, matrices, or other visuals that have row context. To display different values based on the field parameter selection (in a card or similar visuals), the appropriate approach - which you have already mentioned - is to use a SWITCH expression that responds to the slicer selection.
- v-tejramaCommunity Support
Hi sahabatsuria ,
Thank you mohit_sakhare for the response provided!
Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Thank you.- v-tejramaCommunity Support
Hi sahabatsuria ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.