cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Elliott5000 Frequent Visitor
Frequent Visitor

Power BI Report Builder - Find User Name From Power BI Cloud

Hello,

 

Using Power BI Report Builder with reports running on Power BI Cloud with a data gateway, am trying to select the user name of the user viewing the report into a parameter.

 

From the Built-In Fields in Power BI Report Builder have access to User ID which in Power BI Cloud defaults to the user’s email address (e.g. john.smith@corpx.com). I need to exact ideally the user’s username (e.g. CORPX\johnsmi) or if not possible the user’s full name (e.g. John Smith) and/or the user’s first name (e.g. John) and last name (e.g. Smith).

 

Is there a way to do this?

 

The only other user Built-In Field that have seen is language.

 

Thanks

2 REPLIES 2
Eric65 Frequent Visitor
Frequent Visitor

Re: Power BI Report Builder - Find User Name From Power BI Cloud

You could try what I did... using invoke function column

 

In a blank query:

 

let

Name = (email as any) =>

let

Source = if email = null then

""

else

Text.From(email),

removeDomain = Text.BeforeDelimiter(email,"@"),

replaceDot = Text.Replace(removeDomain,"."," "),

fullName = Text.Proper(replaceDot)

in

fullName

in

Name

 

Elliott5000 Frequent Visitor
Frequent Visitor

Re: Power BI Report Builder - Find User Name From Power BI Cloud

Hi Eric65,

 

Thanks for your help but in the specific case am looking at the email logic is not consistent and will not map constantly. 

 

For example for user:

 

User Name -> CORPX\johnsmi

First Name -> John

Last Name -> Smith

 

The email could be john.smith@corpx.com, j.smith@corpx.com, john.smith01@corpx.com other another variations.  

 

 

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 462 members 4,605 guests
Please welcome our newest community members: