Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hola a todos
La pregunta necesita crear RLS dinámico. Por lo tanto, debe iniciar sesión en el gerente de línea o en el centro de facturación. Cómo escribir DAX
| identificación | Correo electrónico del gerente de línea | Correo electrónico de enfoque de facturación |
| 1 | dk@gmail.com | kr@gmail.com |
| 2 | raksh@gmail.com | ab@gmail.com |
| 3 | kum@gmail.com | ci@gmail.com |
Saludos
Dilip
Estos son los pasos que puedes seguir:
1. Puede colocar el siguiente dax en los roles de administración de RLS.
var _line=
CALCULATETABLE(
VALUES('Table'[id ]),
FILTER('Table','Table'[line manager email ]=USERPRINCIPALNAME()))
var _bill=
CALCULATETABLE(
VALUES('Table'[id ]),
FILTER('Table','Table'[billing focal email]=USERPRINCIPALNAME()))
return
IF(
'Table'[id ] in _line || 'Table'[id ] in _bill ,TRUE())
2. A continuación, publíquelo en Power BI Service, haga clic en Rol de edición de seguridad en el conjunto de datos del informe correspondiente y, finalmente, compártalo con el usuario correspondiente.
Seguridad de nivel de fila (RLS) con Power BI - Power BI | Microsoft Learn
3. Resultado:
Saludos
Liu Yang
Si esta publicación ayuda, considere aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente
-- Try this one
RLS_Filter =
VAR CurrentUser = USERNAME()
RETURN
IF (
-- Check if the user is a line manager
CALCULATE (
COUNTROWS (
FILTER (
'YourTable',
'YourTable'[line manager email] = CurrentUser
)
)
) > 0,
1,
-- Check if the user is a billing focal
IF (
CALCULATE (
COUNTROWS (
FILTER (
'YourTable',
'YourTable'[billing focal email] = CurrentUser
)
)
) > 0,
1,
0
)
)
¿Puede compartir a través de un archivo de muestra de PowerBi?
gracias
Dilip
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.