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
Anonymous
Not applicable

RLS in Manage aggregation giving error.

Hi, 

I've created manage aggregation model it's working fine and I tested on Dax studio, all quries are navigating to aggregated tables.

Bur after creating role for RLS on one table, all visuals are failing and giving below error.

 
 

Error1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

And When I see aggregated in data view tab, it's showing below error.

 

Error2.png

 

 

2 ACCEPTED SOLUTIONS

Hi @Anonymous ,

 

Does your RLS meet the following condition?

"To work correctly for aggregations, RLS expressions should filter both the aggregation table and the detail table."

 

Best regards,
Lionel Chen

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

Anonymous
Not applicable

@v-lionel-msft 

@mwegener 

 

Found the problem.

By misktake I've added report level filter from aggregated report after removing that filter RLS worrking fine.

All filter should come from dimesion tables or DQ fact(only if required). 

 

"To work correctly for aggregations, RLS expressions should filter both the aggregation table and the detail table."

 

Thank you Both for the support .

View solution in original post

10 REPLIES 10
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Which method do you use to configure RLS?

Does your account have access permission?

n8.PNG

 

Best regards,
Lionel Chen

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

 

Anonymous
Not applicable

@v-lionel-msft  

Hi,

 

Basically it's Manage aggregation model, you can refer below doc. also.

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-aggregations

 

I've created a composite model:

1. Fact on Direct Query

2. Aggregated table on Import 

3. Dimensions are on Dual mode.

 

I've one customer dimension where I've added role cust. name = " abvcfd", then I'm testing on desktop only.

 

error3.png

Hi @Anonymous ,

 

can provide a sample file or more information?

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

@mwegener 

Hi,

 

It's in DQ, how can provide data?

I can provide  2-3 excel, will that works.

 

Basically it's Manage aggregation model, you can refer below doc. also.

 

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-aggregations

 

I've created a composite model:

1. Fact on Direct Query

2. Aggregated table on Import 

3. Dimensions are on Dual mode.

I've one customer dimension where I've added role cust. name = " abvcfd", then I'm testing on desktop only

error3.png

 

Hi @Anonymous ,

 

does the user "DESKTOP-1234/ABC" have access rights to the database / tables?

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

@mwegener 

 

I don't think so i've define any roles in DW.

So, I need to defines roles in DW on fact tables or all tables  or what level I have defines roles.

Even if I select "Customer name"  roles  only then also it's failing.

But even err04.png

Hi @Anonymous ,

 

Does your RLS meet the following condition?

"To work correctly for aggregations, RLS expressions should filter both the aggregation table and the detail table."

 

Best regards,
Lionel Chen

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

Anonymous
Not applicable

@v-lionel-msft 

@mwegener 

 

Found the problem.

By misktake I've added report level filter from aggregated report after removing that filter RLS worrking fine.

All filter should come from dimesion tables or DQ fact(only if required). 

 

"To work correctly for aggregations, RLS expressions should filter both the aggregation table and the detail table."

 

Thank you Both for the support .

Hi @Anonymous ,

 

can you post a screenshot of the role definition?

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @Anonymous ,

 

I think if you access the table with Direct Query and run this query as another user, the data will be queried with the appropriate user rights.

The user therefore needs corresponding access rights (role) in the SQL database (DW).

Unfortunately, I am not very familiar with this topic.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.