Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Can we pass table value to hyperlink from external website

Hi Team , 

 

I have a requiremnet , where I need to pass a UserID to a external hyperlink provided. 

Say for example the external hyperlink is https/approval@companyname/userID(should come from power bi).

 

can you plese suggest me if this is possible ?

  • Hi Anonymous ,

     

    By userid, do you mean the currently logged in userid? You can use USERPRINCIPALNAME() which returns the email used in accessing the report. If the userid is not the same as the user email then you must have a table with the userid and the corresponding account email and then create a measure similar to below and categorize it to Web URL

     

    hyperlink =
    VAR _UPN =
        USERPRINCIPALNAME ()
    RETURN
        CALCULATE (
            SELECTEDVALUE ( usertable[userid] ),
            FILTER ( usertable, usertable[user email] = _UPN )
        )
    

     

     

1 Reply

  • Hi Anonymous ,

     

    By userid, do you mean the currently logged in userid? You can use USERPRINCIPALNAME() which returns the email used in accessing the report. If the userid is not the same as the user email then you must have a table with the userid and the corresponding account email and then create a measure similar to below and categorize it to Web URL

     

    hyperlink =
    VAR _UPN =
        USERPRINCIPALNAME ()
    RETURN
        CALCULATE (
            SELECTEDVALUE ( usertable[userid] ),
            FILTER ( usertable, usertable[user email] = _UPN )
        )