Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.