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.
The project is about moving between projects.
I have two RLS tables (RLS_origem and RLS_destino), one for the source project(RLS_origem) and the other for the target project(RLS_destino), where I have the user logins (column: email_longin) and the projects released for each one (rls_sk_projeto). In my fact table (fato), I have two columns, one for the source project (sol_origem_sk_prrojeto) and one for the target project (sol_destino_sk_prrojeto).
With this, I need to create an RLS where the project released to the user is present in the source project or target project column in my fact table.
Solved! Go to Solution.
The issue was resolved with the following solution:
SOLUTION:
(
[sol_origem.sk_projeto] IN SELECTCOLUMNS(
FILTER(
'RLS_origem',
'RLS_origem' [email_login] = USERNAME()
),
"Project",
[rls_sk_projeto_orig]
)
) || (
[sol_destino.sk_projeto] IN SELECTCOLUMNS(
FILTER(
'RLS_destino',
'RLS_destino' [email_login] = USERNAME()
),
"Project",
[rls_sk_projeto_dest]
)
)
The issue was resolved with the following solution:
SOLUTION:
(
[sol_origem.sk_projeto] IN SELECTCOLUMNS(
FILTER(
'RLS_origem',
'RLS_origem' [email_login] = USERNAME()
),
"Project",
[rls_sk_projeto_orig]
)
) || (
[sol_destino.sk_projeto] IN SELECTCOLUMNS(
FILTER(
'RLS_destino',
'RLS_destino' [email_login] = USERNAME()
),
"Project",
[rls_sk_projeto_dest]
)
)
Hi @felipemacgregor ,
The following recommendations are for reference:
RLS_Permission =
VAR UserProjects =
UNION (
VALUES ( 'fato'[sol_origem_sk_prrojeto] ),
VALUES ( 'fato'[sol_destino_sk_prrojeto] )
)
RETURN
IF (
CONTAINS (
UNION ( 'RLS_origem', 'RLS_destino' ),
'RLS_origem'[email_login], USERNAME ()
)
&& COUNTROWS (
INTERSECT ( VALUES ( 'RLS_origem'[rls_sk_projeto] ), UserProjects )
) > 0,
BLANK (),
IF (
CONTAINS (
UNION ( 'RLS_origem', 'RLS_destino' ),
'RLS_destino'[email_login], USERNAME ()
)
&& COUNTROWS (
INTERSECT ( VALUES ( 'RLS_destino'[rls_sk_projeto] ), UserProjects )
) > 0,
BLANK (),
1
)
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
38 | |
26 | |
20 | |
14 | |
8 |
User | Count |
---|---|
71 | |
47 | |
46 | |
20 | |
16 |