This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
I need help to figure how see all info in my database for the users listed as "administrador".
The problem is that "Administrador" are not an option in the fact table.
i try the following DAX code to create the Dynamic RLS but it doesn't work (the original file is in the link below)
https://github.com/MathiasChaparroItau/PBI-Files
[VISION] =
VAR _userp = USERPRINCIPALNAME()
VAR _vision =
CALCULATE(
MAX( 'RLS'[VISTA] ),
FILTER( 'RLS',
'RLS'[CORREO] = _userp )
)
RETURN
IF( _vision = "ADMINISTRADOR",
true(), _vision )
Part of the Fact Table
| FECHA | DESCRIPCION | TIPO | VISION | IMPORTE |
| 31/10/2021 | GASTOS ADMINISTRATIVOS | FIJO | MARKETING | 220 |
| 31/10/2021 | EGRESOS EXTAORDINARIOS | FIJO | GERENTES | 243 |
| 31/10/2021 | EGRESOS EXTAORDINARIOS | PROYECTO | CUENTA NUEVA | 154 |
| 31/10/2021 | GASTOS ADMINISTRATIVOS | FIJO | 56 | |
| 31/10/2021 | GASTOS ADMINISTRATIVOS | FIJO | MARKETING | 131 |
Table RLS
| RESPONSABLE | VISTA | ID Perfil | CORREO |
| Mathias Chaparro | ADMINISTRADOR | 1 | |
| Jose Benegas | ADMINISTRADOR | 1 | jose.benegas@mail.com.py |
| Sylvana Areco | ADMINISTRADOR | 1 | Sylvana.areco@mail.com.py |
| Adriana Lopez | MARKETING | 2 | |
| Alfredo Prono | MARKETING | 2 | Alfredo.prono@mail.com.py |
| Andres Cubas | GERENTES | 3 | |
| Andrea Heleno | GERENTES | 3 | Andrea.heleno@mail.com.py |
| Jose Cardenas | GERENTES | 3 | Jose.cardenas@mail.com.py |
| Alejandro Gonzalez | CUENTA NUEVA | 4 | Alejandro.gonzalez@mail.com.py |
| Catalina Areco | CUENTA NUEVA | 4 | Catalina.areco@mail.com.py |
I would appreciate your help with this problem. I thank you in advance!
I changed the code a little to return true or false but I still can't get the "ADMINISTRADOR" to see all the rows.
Could someone help me please? I am not an expert and I would like to know if someone could help me
VAR _Admin =
IF( MAX('RLS'[VISTA]) ="ADMINISTRADOR",
1,
0
)
RETURN
IF (
MAXX (
FILTER ( 'RLS', 'RLS'[CORREO] = USERPRINCIPALNAME() ),
_Admin )= 0,
MAX('RLS'[CORREO]) = USERPRINCIPALNAME(),
true
)
Could someone guide me?
The RLS works with all the "VISTAS" except those of "ADMINISTRADOR" which are not found in the fact table
tks
the RLS rules need to return true or false, not strings.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 34 | |
| 25 | |
| 24 |