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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Parameter Output to Role as input value

Hi im trying to implement a kind of security to dashboard using ManageRole on desktop,

i have a dataset with fields UserName,IsUserHasAccess

usually IsUserHasAccess field has 3 different values (Y,N,*).

so here each user is having one of the value among these 3 (Y,N,*),

im passing UserName as a input Parameter now the out put for this should be passed to my Role

whether Y,N or *

how to implement this.

any ideas.

1 ACCEPTED SOLUTION

@Anonymous

 

No, you don't need to create a parameter. USERNAME() is a build-in function to return the "domain\username" of accessing user.

 

Regards,

View solution in original post

4 REPLIES 4
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

In this scenario, you can create a Table filter DAX expression in Manage Role like below:

 

IF (
    LOOKUPVALUE ( Table[IsUserHasAccess], Table[UserName], USERNAME () ) = "Y",
    TRUE,
    FALSE
)

Regards,

Anonymous
Not applicable

Thannks alot Simon,

do i need to create one Parameter(USERNAME()) first in Edit query or the below DAX creates.

 

@Anonymous

 

No, you don't need to create a parameter. USERNAME() is a build-in function to return the "domain\username" of accessing user.

 

Regards,

Anonymous
Not applicable

Thanks alot Simon this did work.

can you please reframe the expression,

if i have a Parameter with Name USERNAME while entering in to desktop it shoud pop up for this.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors