Forum Discussion
Selectedvalue text not working in a filter where hard-coded text does
Hi!
I'm trying to filter a table by name. I'm using a calculate statement and filtering on a Time Intelligence table that's set up by weeks; that part of the filter works.
What isn't working is when I try to add a filter for employee name. I've created a duplicate of my original table, deleted the columns, and removed duplicates to generate a list of unique names. I created a slicer that let's me select a name, and I created a measure:
Comparing to a variable:
Comparing to a measure:
Many thanks!
4 Replies
- sandeephijam
Helper II
Hi There,
See by Providing the Alternate Result as well.
SELECTEDVALUE(<columnName>[, <alternateResult>])
Or else you can also try the HASONEVALUE( ) function as well
IF(HASONEVALUE(<columnName>), VALUES(<columnName>), <alternateResult>).
Use SELECTEDVALUE instead of VALUES in DAX - DAX | Microsoft Learn
- brianhawleyFrequent Visitor
Thanks for looking at this. The generated names table has no duplicate values, so there isn't an alternate result. I tried both suggestions for good measure and there was no effect.
If I place the [Selected Employee] measure into a Card visual, the single name appears and changes based on what I've selected in the slicer, which is set to single selection.
- GuirikikiFrequent Visitor
Hello,
I have the same problem. Do you find a solution ? Thank you.
- sanjyot_firke
Helper II
Was there any solution found to this issue? We are facing the same issue.