Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
Solved! Go to Solution.
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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks @MFelix.
The link is really helpful. I should have googled it before posting question here though :). Thanks for your time.
Regards
Harshad
Hi @Anonymous,
No problem the forum exists for this 😄
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks @MFelix
Need more help. Do you know how I could use the 'AND' condition while makinh the role? I used following but its not accpeting.
([Category] = "BLD" and [Category] = "BMV")
I am try to check on google but can't find any help yet. Please advise.
Thanks!
Harshad
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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsSorry got it!
I used the following
[Category] = "BMV" && [Category] = "BLD"
and its validated successfully.
Thanks!
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |