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
Krogne
Frequent Visitor

RLS removes authorized rows from resulting dataset (truncates)

Hello,

 

We have observed a strange behavior that causes data to be truncated in the visualisations. When viewed as a role with filter on a table with a one-to-many relation to a different table, and the table has invalid keys, the rows are removed completely.

Scenario:

 

Every table that should have RLS, has a column with account ids.

The actual key for the table is a combined key from the account id, and what would be the key without RLS.

the tables has the following relations

Relations

 

When a role with no filter is applied this is the result:

 

When a role that filters on table[accountId] = "asdf" is enabled, this is the result:

As expected.

 

Now a role with filter table[accountId] = "qwer" enabled:

 

Data rows from the sales table are missing. 

 

 

Is this expected behaviour in such a scenario?

 

Are there ways to make it behave as expected when the data is arranged this way? (Besides adding "void" rows to every single table)

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Krogne,

Create relationship between sales table and supervisor table as shown in the following screenshots. Create same role as described in attached PBIX file.

1.PNG2.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
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-yuezhe-msft
Employee
Employee

@Krogne,

Create relationship between sales table and supervisor table as shown in the following screenshots. Create same role as described in attached PBIX file.

1.PNG2.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yuezhe-msft
Employee
Employee

@Krogne,

What fields of there tables (Employee Table, Supervsor Table, Sales Table) do you use to create relationship?

If you use key field of Employee Table and EmployeeKey field of Sales Table to create one to many rleationship, I note that the Employee Table doesn't contain qwer value. Same scenario occurs in Supervisor table if you use key field of Supervisor and SupervisorKey of Sales Table to create relationship.

In addition, do you create the role filter in Employee table? Could you please copy the data of the above tables in Excel file and share me the Excel file so that I can copy and paste data.

Regards,
Lydia

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

@v-yuezhe-msft

The relations are between:

Sales[EmployeeKey] <> Employee[key]

Sales[SupervisorKey] <> Supervisor[key].

 

Excel: Excel data

 

Role filter is applied on both Employee and Supervisor tables.

 

-Krogne

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.

Top Solution Authors