Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

One report for multiple users

Hello,

 

I have one requirment when I need to crate one report and that report will be shared across 10 usres but the report should show only the user specific data i.e. if user1 logged in to power bi then he should see the data just for him and no other's data same with all other users.

 

I undertstand that we could get user name who is logged in by creating a measure in desktop with username() and that will show the email id of that user but how could I use this to filter? Isn't it possible to accept the data query with filter (bind parameter) in 'where' clause  like-

 

select * from table where user = :empname --(this will come from username() measure)

 

 

My database is on-prem SQL server. Any help or any new approach would be greatly appreciated.

 

Thanks!
Harshad

  • Hi Anonymous,

     

    I believe that the best way is to use the Row Level Security check this link with explanations or just google: Power Bi Row Level Security.

     

    Regards,

    MFelix

  • MFelix's avatar
    MFelix
    8 years ago

    Hi Anonymous,

     

    Below see the notation for AND and OR filter:

     

    AND notation
    
    Calculate (Sum([Value], [Category] = "BLD" && [Category] = "BMV")
    
    OR notation
    
    Calculate (Sum([Value], [Category] = "BLD" || [Category] = "BMV")

    I have made it inside a calculate just for better understanding.

     

    Regards,

    MFelix

7 Replies

  • Hi Anonymous,

     

    I believe that the best way is to use the Row Level Security check this link with explanations or just google: Power Bi Row Level Security.

     

    Regards,

    MFelix

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks MFelix.

       

      The link is really helpful. I should have googled it before posting question here though :). Thanks for your time.

       

      Regards

      Harshad

      • MFelix's avatar
        MFelix
        Super User

        Hi   Anonymous,

         

        No problem the forum exists for this :D

         

        Regards,

        MFelix