Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

RLS with out relations

Hi guys,

 

i have a strange scenario issue.

 

i have developed a power BI report and its works fine.

 

In this report there are 25 individual datasets and one 1 dataset for summary view.

 

Basically this is SSRS to Power BI migrated report.

 

in SSRS we usually give report authentication based on RDL using active directory.

 

but in power BI we need to have a relaybetween the dataset and user.

 

so, as i said i have 25 datasets. Customer wants to assign RLS for all these datasets. They sent a spreadsheet with user email and which dataset they should access.

 

25 datasets * multiple users

one user may access 2 or more datasets or only 1.

 

we dont have any relationship between dataset and user table. 

up on user login they should see thier own data.

i really tried a lot and i am running out of ideas. Any help on how to implement this please???

sturlaws mwegener GilbertQ nickyvv collinq ibarrau 

6 Replies

  • Add that table (which user can see which dataset) to your data model and wire it in to the datasets  (create [datasetid] column if needed).  Then use RLS on the mapping table.

    • Anonymous's avatar
      Anonymous
      Not applicable

      lbendlin  sounds like some workaround, would it be possible for you elaborate a little bit?

       

      meantime, below is my current model.

      it has 25 datasets, all of them are mapped to 1 main dataset. and that main dataset is mapped with user table now. 

       

       

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        that's not a data model, that is an abomination. RLS may not even work on this.

         

        "Regular"  data models have mostly 1:* relationships with the filter direction from the 1 to the many side, and the RLS table sitting at the "top" of the hierarchy (outermost layer).

         

        what's the reason for all these *:* and bidirectional links?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    I'd like to suggest you extract the core fields(e.g. user id) from your datasets and use it as bridge to mapping these datasets. You can apply the RLS on this table, then RLS filter effect can apply to other tables based on the relationship.

     

    User Bridge =
    DISTINCT (
        UNION (
            ALL ( Table1[UserID] ),
            ALL ( Table2[UserID] ),
            ALL ( Table3[UserID] ),
            ALL ( Table4[UserID] ),
            ...
        )
    )
    

     

    how to join many to many with a bridge table in power bi 

    In addition, you can also refer to the following link about how the tabular model relationship mapping:

    Relationships in analysis services tabular models 

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable
      Spoiler
      Anonymous  thanks for your response, our current model is not in SSAS Tabular.
      it is in Power BI desktop it self.

      I will try to split all the individual datasets and then will give it a try.