Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Power BI Display output of Role Applied.

This screenshot is an example of the desired output. 

BI_Role_Name.png
I'm trying to build a PowerBI report at the top right hand corner show the username and the applied role that the user has. 
This will make it easier for me when a user shows me a screenshot of the report, so I know which role got applied to that user since they maybe exists in different groups. 

 

Any DAX or forumals I can use to see the name of the Power BI Role that got applied? 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

For your scenario, we couldn't get users' access by some functions directly. After researching, I think you might need to create a role name table like my sample to show the access. 

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Thanks for the feedback, that does get the name of the Role that I have stored in the Permission Table.
However that's not what I'm attempting to do. 


I have different PowerBI Roles, for example the FullAccess Role in PowerBI has no filters and does not use a table.
I've assigned the report builders to FullAccess.  I need to relay that they been given PowerBI Role FullAccess.    
So in FullAccess has no role name in a table for me to lookup with a measure. I'm not sure if PowerBI has any built in DAX or some type of custom function that will help me display which PowerBI role name that is being applied to the user.

 

Hi @Anonymous ,

For your scenario, we couldn't get users' access by some functions directly. After researching, I think you might need to create a role name table like my sample to show the access. 

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you for the feedback. 

 

I was trying to Manage all this with Direct Query and avoid a "Enter Data" table and prevent PowerBI Desktop going into import mode.
I will create a table on the SQL Server just to filter for the table of the permission that the BI Report is using.

I would be nice if in the future, that Power BI Name can be exposed by a function call.

 

Thank you for you help!

v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

We can get the username directly. However, we need to create a new table of "Roles" to get their roles. I created a sample that you can reference and check if is what you want. (The new table is created manually by myself.)

 

3.PNG2.PNG

Measure = USERNAME() &"  "&CALCULATE(MAX('Table'[Role]),FILTER('Table','Table'[ID] = MAX(USER[ID])))

4.PNG

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
adityavighne
Continued Contributor
Continued Contributor

@Anonymous 

 

create a measure 

Selected Role = "Selected Role - "& SELECTEDVALUE('Tabel Name'[Role],"None")
 
and add Text Box and add function in the title by selecting 3 dots...
Capture.PNG
 
regards,
Aditya Vighne
 
note - accept as a solution if query is resolved

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.