Forum Discussion
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!
Hey, Daniel29195 e Anonymous!
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
_ResultSo 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!
5 Replies
- Daniel29195Community Champion
- franciscocruzRegular VisitorHi Daniel! I'll watch and get back to you. Thanks for now.
- franciscocruzRegular Visitor
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. 😔