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

Security Roles

Hi,

 

Is there a way to create a security role that will prevent some users to view some data in a visual?

 

For example, I have a sales chart and have a measure called "Margin" as a tooltip. Am I able to create a security role that some people, e.g. managers, can view everything in that chart, while employees can only view the sales data chart without the "Margin"?

 

I tried to use Row Level Security, putting the Cost = 0 (the cost is used to create the measure "Margin", but that didn't help as it eliminates most part of the data.

 

Thanks!

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Create a separate table with maybe a single row in it with a single column, just garbage data. Now, create a role that has access to that table and a role that does not.

 

Now, create a check in your measure that looks at the COUNTROWS of that table. If it is BLANK, return BLANK, otherwise perform your calculation.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

The suggestion of Greg_Deckler should be helpful.

Have you solved the problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please feel free to ask.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

Create a separate table with maybe a single row in it with a single column, just garbage data. Now, create a role that has access to that table and a role that does not.

 

Now, create a check in your measure that looks at the COUNTROWS of that table. If it is BLANK, return BLANK, otherwise perform your calculation.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

This is helpful. Thank you @Greg_Deckler !

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
Top Kudoed Authors