Forum Discussion
Anonymous
5 years agoNot applicable
Use UserprincipalName() in a Column . or a Measure
I have to build a link which includes the Employee Id of the Person logged in , but there is no relationship between the Table that I am using and the staff table ... I have 2 columns in the ta...
v-alq-msft
Community Support
5 years agoHi, Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Data:
Staff:
You may create a new role as below.
[Email]=userprincipalname()
Then create a measure with following dax.
Link2 Measure =
var c =
COUNTROWS(
Staff
)
return
IF(
c>1,
MAX(Data[Link2]),
IF(
MAX(Data[Link2])<>"",
MAX(Data[Link2])&MAX(Staff[Email])
)
)
Finally when you view as the corresponding role, it will display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.