Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

selectedvalue shows blank

Hi, wonder you can advise.

 

I would like to concatenate 3 text columns: Role, Company and Department.

I used the following format: 

Role = SELECTEDVALUE('user HR'[Role])&"/ "&SELECTEDVALUE('user HR'[Company])&"/ "&SELECTEDVALUE('user HR'[Departament])
 
So based on the slicer selection (which is list of people) it would display that info accordingly. Now for some reason it will not show Role. So the current outcome is this: /Company1/Departament1
These columns come from the same table not sure why Role is blank ?
  • Hi Anonymous 

    SELECTEDVALUE('user HR'[Role] ) returns blank when more than one value in 'user HR'[Role] is active (selected) in the current filter context. That's most likely what is happening

    Please mark the question solved when done and consider giving kudos if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers 

     

     

2 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    SELECTEDVALUE('user HR'[Role] ) returns blank when more than one value in 'user HR'[Role] is active (selected) in the current filter context. That's most likely what is happening

    Please mark the question solved when done and consider giving kudos if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers 

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      AlB , thank you!

       

      I think that's what it was. I added an extra filter to the measure and now it works 🙂

      Role =
      VAR min_level =
          MIN ( 'user AD'[User Org Level] )
      RETURN
          CALCULATE (
              SELECTEDVALUE ( 'user HR'[Role] ) & "/ "
                  SELECTEDVALUE ( 'user HR'[Company] ) & "/ "
                  SELECTEDVALUE ( 'user HR'[Departament] ),
              'user AD'[User Org Level] = min_level
          )