Forum Discussion
Filter Dinamic for USER
Hi dlagos - Improvised measure as below:
MEASURE '02-Cal Real'[01-Real Dinamico] =
VAR Real = '02-Cal Real'[01-Real]
VAR Usuario = USERPRINCIPALNAME()
-- Filter the Maestro RLS table to get the current user's row
VAR UsuarioActual = FILTER('Maestro RLS', 'Maestro RLS'[Correo electrónico] = Usuario)
-- Get the list of CC values for the current user
VAR CCActual = SELECTCOLUMNS(UsuarioActual, "@CC", 'Maestro RLS'[CC])
-- Check if CCActual has values and apply the filter dynamically
RETURN
IF (
ISBLANK(CCActual),
BLANK(),
CALCULATE(
Real,
'Centro de Costo'[DEPENDENCIA (Oracle)] IN VALUES(CCActual[@CC])
)
)
Ensure that row-level security (RLS) is properly configured in Power BI and the Maestro RLS table is included in the model.
Hope this helps.
Now i have this error