Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic RLS: propagate to non-security dimensions
Hi. I have been struggling finding a good solution to a very common RLS-problem for awhile. I will try to explain it here with a simple example: My data model contains the following tables: D...
- Anonymous5 years ago
The answer was very simple after all... This piece of beauty did the trick:
[CustomerID] =
CALCULATE (
MAX ( User[CustomerID] ),
FILTER ( User, User[UserEmail] = USERPRINCIPALNAME () )
)This code needs to be applied to all Dimensions in my security role for which I only want to see lines relevant to Customer XXX
Hope this can help others too.
Anonymous
5 years agoNot applicable
Hi vasathi,
Yes I have,
1. Create this measure - in my case I have 4 fact tables connected to the same dimension table so I have 4 COUNTROWS statements:
SlicerFilterFinance =
COUNTROWS(ActualIncome) +
COUNTROWS(ActualBalance) +
COUNTROWS(BudgetIncome) +
COUNTROWS(BudgetBalance)
2. Then put it in visual level filters for all relevant dimension table slicers like this:
3. Now the dimension table slicers only show the values if represented by >= 1 rows in any of the fact tables in the measure.
Simple, but effective 🙂
Hope this helps.
Br