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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Redraidas1
Helper I
Helper I

Need help with understanding row level security in a very simple PBIX

Hello,

 

I've created an extremely simple report with only one visual for learning how Row Level Security works. I've added in some very basic role level security, however, for some reason the only visual that's in my report won't show any data as soon as I select 'View as' -> New Role. Can someone please explain why I cannot see any data in my visual with RLS applied?

 

PBIX:

https://easyupload.io/jlc3ro

1 ACCEPTED SOLUTION
v-yuaj-msft
Community Support
Community Support

Hi @Redraidas1 ,

 

Based on your description, you can do some steps as follows.

1. Create a calculated table and establish a relationship between new table and table “Report Config”.

Table =

VAR x1 =

    SUMMARIZE ( 'KPIs Locale', 'KPIs Locale'[Locale], 'KPIs Locale'[Field Code] )

RETURN

UNION ( x1, 'Trading Summary Locale' )

v-yuaj-msft_0-1610345714176.png

2. Create a new role.

v-yuaj-msft_0-1610345763580.png

 

Result:

v-yuaj-msft_2-1610345714183.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

3 REPLIES 3
v-yuaj-msft
Community Support
Community Support

Hi @Redraidas1 ,

 

Based on your description, you can do some steps as follows.

1. Create a calculated table and establish a relationship between new table and table “Report Config”.

Table =

VAR x1 =

    SUMMARIZE ( 'KPIs Locale', 'KPIs Locale'[Locale], 'KPIs Locale'[Field Code] )

RETURN

UNION ( x1, 'Trading Summary Locale' )

v-yuaj-msft_0-1610345714176.png

2. Create a new role.

v-yuaj-msft_0-1610345763580.png

 

Result:

v-yuaj-msft_2-1610345714183.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

Greg_Deckler
Super User
Super User

@Redraidas1 - Took a look. The reason is that you have two RLS rules and the combination of them eliminates all records from Report Config. Your two rules are:

  • KPIs Locale: [Locale] = 1
  • Trading Summary Locale: [Locale] = 1

The problem is that Locale = 1 in KPI's table is Field code 111 while Locale = 1 in Trading Summary table is Field code 333. Since those tables are related to table Report Code on Field code columns there is no case where there is a field code that is both 111 and 333 simultaneously and hence, blankness.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  - Thanks for that.

Would you have any solution for how to solve this problem? I want KPI Locale and Trading Summary tables to filter out my main (Report Config) table so that my Report Config table only shows Field Code 111 and Field Code 333.  Or is that not possible?

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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