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

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.

Reply
Anonymous
Not applicable

El RLS para el IsAdmin no funciona correctamente debido a la falta de todos los valores posibles en las tablas de Bridge.

Hola a todos

No estoy seguro de si estoy repitiendo un problema similar de RLS que se enfrentó anteriormente. Mi objetivo es implementar el RLS teniendo en cuenta el usuario IsAdmin.

Tengo 4 tablas, Userdim, Roles, UserRolemapping, Tabla transaccional.

He incorporado el siguiente DAX en la tabla userdim.

Si(
Maxx(
Filtro(
'Representante de ventas',
'Representante de ventas'[Correo electrónico]=nombre de usuario())
,'Representante de ventas'[Es director])=0,
'Representante de ventas'[Correo electrónico]=nombre de usuario(),
1=1
)
Esto funciona bien y filtrar los datos en mi Userrolemappingtable sin embargo mi tabla userrolemapping no tiene todas las combinaciones posibles como la de la tabla transaccional. Por ejemplo. hay un roleid 6 (existe en los datos de origen, pero no he incorporado a la tabla Roletable o en la tabla userrolemapping en Power BI debido a razones xxx) y este rol 6 tiene una transacción válida en la tabla transaccional. Puesto que el roleid 6 no está presente en Userrolemappingtable, el usuario Administrador no puede ver este registro determinado.

¿Hay alguna manera de abordar este escenario? Espero haber informado bien al esceario.
Acogiendo con beneplácito cualquier sugerencia al respecto y agradezca la ayuda de antemano.
saludos
Jishnu
4 REPLIES 4
Anonymous
Not applicable

Hi, The scenario is as follows:

Userdimtable:

UserId, Username,IsAdmin

1, A,1

2, B,0

3,C, 0

4,D,0

 

RoleUserTable

RoleId, UserId

1,2

2,2

 

TransactionalTable:

TransactionalId, RoleId, Sum

1,1,10

2,1,15

3,100,50

 

Now the problem is the Role 100 in the transactional table is not present in the Roleusertable. Hence when I apply the mentioned DAX in the original post, eventhough it identifies the admin it can't show the 3rd row from Transactionaltable. 

 

Hope it is clear now and please help.

 

Regards,

Jishnu

2,

@jishnu, no estoy seguro de que esto pueda ayudar. Pero puede crear una nueva fila mediante enter data para RoleId y combinarla con la tabla Roleusertable en el modo de consulta de edición.

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

@jishnu - Supongo que mi pregunta es esta. ¿Se supone que el rol de administrador lo ve todo?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

@jishnu - No estoy seguro de que 100% lo entiendo, pero tal vez cree un rol independiente para los usuarios administradores que tenga una lógica diferente para la regla RLS que no caiga en ese desvío. Necesitaría más información para ser más específicos.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.