Forum Discussion
Row level Security on multiple dimension alias table
- 4 years ago
Hi maharaj_narayan ,
The Row level Security is applied seperatedly , So if you apply the DAX to these three table seperately, it will looks like an inner join.
='Dim - Agent_sold'[Agent NT Login]=MID(USERNAME(),FIND("\",USERNAME(),1)+1,LEN(USERNAME())-FIND("\",USERNAME(),1)+1)Here is a simple example:
When I apply RLS to one table:
Output:
When I apply RLS to three tables:
Output:
You can try to apply RLS to Fact-case Table like this:
Final output;
Please try:
[Case Created by] = MID(USERNAME(),FIND("\",USERNAME(),1)+1,LEN(USERNAME())-FIND("\",USERNAME(),1)+1) || [Case Modified by] = MID(USERNAME(),FIND("\",USERNAME(),1)+1,LEN(USERNAME())-FIND("\",USERNAME(),1)+1) ||[Case Completed by] = MID(USERNAME(),FIND("\",USERNAME(),1)+1,LEN(USERNAME())-FIND("\",USERNAME(),1)+1)Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
below is a simple diagram representing the fact table connected to different dim tables(all three as same table just aliased into different name)
say i wanted to see agent name by number cases on different scenarios like case created, case modified, case completed.
when i implement the Row filter only on case created agent with the above dax, im getting the right value say
Agent name case created
Maharaj 100
now if i add the row filter to Case modified agent and see the same agent name and case created the values are getting changed
Agent name case created
Maharaj 50
if i add the third table for which "Maharaj" has not completed any cases all together i get 0 records even for the cases created or cases modified.
Hope i explained clear now, sorry i could not attach any pbix file.