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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
franciscocruz
Regular Visitor

When running RLS, page data is not completely filtered, just some visuals. And when doing this same

Hey guys!

I hope everyone is okay.

I am facing a problem with my model. I have a DirectQuery connection, and when performing RLS using the user's email, the page data is partially filtered, that is, only some visuals comply with the filter and others do not.

Now if I run the same filter using a data seeder, the page is filtered perfectly.

Has anyone been through this type of scenario and can give me some help, please?

Thank you very much!

 

1 ACCEPTED SOLUTION

Hey, @Daniel29195 e @v-zhouwen-msft!


I managed to solve the problem. In fact, my original measurement had some conditions. It was like this:

Goal 1 - % Achieved - C2024 =

VAR _DaniloPEA =
CALCULATE(
[A+ Companies - PE - C2024],
dFuncionario[Email] = "email.com"
)

VAR _DaniloRA =
CALCULATE(
[Goal 1 - A+ Meetings - C2024],
dFuncionario[Email] = "email.com"
)
VAR _EquipePEA =
CALCULATE(
[A+ Companies - PE - C2024],
ALL(dEmployee[Name], dEmployee[Email]),
dFuncionario[E-mail Coordinator] = "email.com"
)

VAR _EquipeRA =
CALCULATE(
[Goal 1 - A+ Meetings - C2024],
ALL(dEmployee[Name], dEmployee[Email]),
dFuncionario[E-mail Coordinator] = "email.com"
)

VAR _Result =
IF(
SELECTEDVALUE(dEmployee[Email]) = "email.com",
DIVIDE(
_EquipeRA - _DaniloRA,
_EquipePEA - _DaniloPEA
),
DIVIDE(
[1st Meetings - C2024],
[PE Companies - C2024],
0
)
)

RETURN
_Result

 

So for some reason when I used RLS, the filter didn't reach some visuals. To solve the problem, I adapted the measurement and it looked like this:

 

Goal 1 - % Achieved - C2024 =
CALCULATE(
DIVIDE([1st Meetings - C2024], [PE Companies - C2024]),
dEmployee
)

I used CALCULATE to force the filter on the "dFuncionario" table, and in the end everything worked fine.

Thank you very much for the time you took to help me. Thank you so!

View solution in original post

5 REPLIES 5
Daniel29195
Super User
Super User

Hi Daniel! I'll watch and get back to you. Thanks for now.

Hi Daniel!

I watched your selection. In the video he refers to RLS coming from the source, which is not my case. In my case, I create the RLS using an "employee" dimension that I developed manually to bridge the DirectQuery table.

Using this "employee" dimension in the data segmenter, the page is filtered perfectly, but when I do the same filter in RLS, only some visuals are filtered, the others remain without obeying the filter. 😔

Hi @Daniel29195 , thanks for the quick reply.

Hi @franciscocruz ,

Regarding your question, you mentioned that you created a security information table 'employee'.
1. RLS filters are only propagated through activity relationships, make sure there is a correct one-to-many relationship between the dimension table and the fact table.
2. If there is no problem with the model relationship, ensure that the correct UPN is stored in the security information table, then you can try reconfiguring RLS.
3. Check the official documentation of your data source to see if RLS is supported.

For more information, please refer to the following articles:

Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

Row-level security (RLS) guidance in Power BI Desktop - Power BI | Microsoft Learn

 

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

Hey, @Daniel29195 e @v-zhouwen-msft!


I managed to solve the problem. In fact, my original measurement had some conditions. It was like this:

Goal 1 - % Achieved - C2024 =

VAR _DaniloPEA =
CALCULATE(
[A+ Companies - PE - C2024],
dFuncionario[Email] = "email.com"
)

VAR _DaniloRA =
CALCULATE(
[Goal 1 - A+ Meetings - C2024],
dFuncionario[Email] = "email.com"
)
VAR _EquipePEA =
CALCULATE(
[A+ Companies - PE - C2024],
ALL(dEmployee[Name], dEmployee[Email]),
dFuncionario[E-mail Coordinator] = "email.com"
)

VAR _EquipeRA =
CALCULATE(
[Goal 1 - A+ Meetings - C2024],
ALL(dEmployee[Name], dEmployee[Email]),
dFuncionario[E-mail Coordinator] = "email.com"
)

VAR _Result =
IF(
SELECTEDVALUE(dEmployee[Email]) = "email.com",
DIVIDE(
_EquipeRA - _DaniloRA,
_EquipePEA - _DaniloPEA
),
DIVIDE(
[1st Meetings - C2024],
[PE Companies - C2024],
0
)
)

RETURN
_Result

 

So for some reason when I used RLS, the filter didn't reach some visuals. To solve the problem, I adapted the measurement and it looked like this:

 

Goal 1 - % Achieved - C2024 =
CALCULATE(
DIVIDE([1st Meetings - C2024], [PE Companies - C2024]),
dEmployee
)

I used CALCULATE to force the filter on the "dFuncionario" table, and in the end everything worked fine.

Thank you very much for the time you took to help me. Thank you so!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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