Forum Discussion

showy's avatar
showy
Helper II
1 year ago
Solved

RLS with multiple conditions

Hello
I have the following problem.
I want to create RLS with multiple conditions.

Now I have a report with 2 pages. One evaluates customers and the other contacts. I cannot add the two dimensions to one.

I have now created the two RLS conditions in one role, but my pages are not filtered and are empty.

  • showy , This is because RLS is doing and for both and you are not getting data. We can not change RLS based on Page, we can do based on user.

     

    On quick solution can be

    In this can you can create a two measures based on userprinipal and use them as visual level filter and hide filter pane from user. and that can give filter based on table you wnat on each page

4 Replies

  • Hello showy,

     

    Can you please try the following:

     

    1. Set RLS on Dim_Contact Table and Dim_Customer Table

    [Email] = USERPRINCIPALNAME()
    

     

    2. Ensure that Dim_Contact is linked to Fact_1 via ContactCode and Dim_Customer is linked to Fact_2 via CustomerCode.

     

    3. Since the two dimensions (Dim_Contact and Dim_Customer) are unrelated, confirm there is no direct relationship between them in your data model.

     

    Hope this helps.

    • showy's avatar
      showy
      Helper II

      Hello Sahir,

      yes all the 3 point you are mentioning are correct im my model. But if i go to Show AS and select the user and role i get no data

      • amitchandak's avatar
        amitchandak
        Super User

        showy , This is because RLS is doing and for both and you are not getting data. We can not change RLS based on Page, we can do based on user.

         

        On quick solution can be

        In this can you can create a two measures based on userprinipal and use them as visual level filter and hide filter pane from user. and that can give filter based on table you wnat on each page