Forum Discussion

yiannis's avatar
yiannis
Frequent Visitor
5 years ago
Solved

Binding Database schema to report

Hello,

I am using a multi tenant azure database and I have created one report that i would like to share with more than one person. I have created a parameter to change the schema of the database and it works fine. I want to share this report with users but i want each user to see report based on a different database schema. 

I have created a table with users two columns (email, schema) expecting to bind schema to username. But i got stucked and I cannot go on. 

Can you help ?

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    yiannis 

    Try RLS, the idea is create RLS roles with schema = "xxxx", then assign users to different role on Power BI Service in the dataset security option.


    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

    • yiannis's avatar
      yiannis
      Frequent Visitor

      I have tried RLS but i cannot change the schema parameter. I have created a parameter called [Schema] and I have placed it at the query. 

      I have also created a table with email and schema columns in order to use the Username() and create the role accordingly. 

      i got stucked after as i dont know how to bind the schema with the username(). I have to mention here that the queries i get data does not have a field with email in order to bind them. So the only way i can figure out is to open a dialog to the user asking his email and then do the binding afterwards. Still i don't know how to do it

      • Arildsen's avatar
        Arildsen
        Frequent Visitor

        Hi yiannis

         

        Did you ever solve this? I'm in the exact same sitation.

         

        Thanks

        ARP