rls
40 TopicsFiltering data on selected language
Hi, I'm trying to create a multi-language report based on the USERCULTURE(). I started by creating a measure: Selected_Language = LEFT(USERCULTURE(),2) This returns the language: en, nl, fr, ... I have an overview of events, each containing a code for department, function, ... I imported an excel containing "codes" and their translations for certain tables: Department Function Based on the selected_language measure, I would like to display the correct value for department and function for each event. I created un unpivoted table "Safety codes" containing all codes: I created a parameter "Language" that I used to filter on role level: This seems to be working fine: However, to be able to use this approach, the user needs to be a viewer, not a member or contributer. But as a viewer, the user is not able to pin certain visuals to a dashboard. Any idea how to fix this? Or is there another approach? Without the RLS filtering, the values in all languages are shown: Thanks for some feedback on this.Solved585Views0likes3CommentsRLS filtering based on sub-group membership
Hi and glad to add more info if it helps (as with many, I can't share precise data so I apologize in advance). I have 2 huge tables: AllUserRaw - contains a lengthy list of AD Service accounts with a column of "supportgroup" among others (lots of other columns of info that would interest the owners). That SupportGroup column contains the Service Now support group name per account. It also has a dedicated owner "OwenerSamAccountName" in addition to the support group: SamAccountName SupportGroup OwenerSamAccountName serviceAccountABC HelpdeskGroup fred serviceAccountZYX HelpdeskGroup jane serviceAccountQWE Janitors tom ... ... ... SnowGroups - is a dump of Service Now that has columns "groupname" and the member's "usernames". Each group is enumerated and shows the username in each group: GroupName Username HelpdeskGroup fred HelpdeskGroup sally Janitors mcrib Janitors fillet ... ... The issue in a nutshell: users connect to the dashboard using RLS and it works well to display the rows where they are the "direct owner" from the "AllUserRaw" table (this is easy to use RLS to match the UserPrincipalName to the Owner column). The issue is that if the logged in users is not a direct owner, we still want to display the rows from the Raw Users if they are a member of a support group. (In this example, Sally cannot see any rows because they are not the direct owner yet they are a member of the support group so they still should) What I tried: I tried linking the 2 tables together in the model by the "groupName" but that throws a "many to many" error as each table has many duplicate values. (eg many service accounts can have the same support group and then the support group table has many people in the same group). I tried using a DAX created bridge table between them but the issue still exists that if Sally connects, the bridge doesn't work correctly and displays nothing. I also tried creating a dynamic table using USERPRINCAPLNAME() that would only show support groups of the viewing user but PBI doesn't let you do that in dynamic tables. What I'm after: I don't mind 2 separate table visuals if it helps/matters: 1 for the "direct view" and the other for "support group view". If there was a filter/DAX way of doing a "reverse lookup" to say "if you're a direct member OR you're a member of a support group attached to that account" then show those rows. (eg filter on snowgroups based on who's logged in, get the unique group name(s) they are a member of as it could be many, and then for each group name, display the associated accounts to those groups) I hope I'm just overthinking this but I'll try and answer any questions. Thanks in advance!Solved1.1KViews0likes6CommentsMasking Name Data using DAX Filter for Row Level Security
How to mask name data using DAX Filter for Row Level Security in SQL Server Analysis Services Tabular databases? I used this DAX filter but all the data not shown after applying this DAX: =IF( UNICODE( LEFT( DIM_TRAVELEMPLOYEE[VKTPNAME]; 1 ) ) >= 65 && UNICODE( LEFT( DIM_TRAVELEMPLOYEE[VKTPNAME]; 1 ) ) <= 90 || UNICODE( LEFT( DIM_TRAVELEMPLOYEE[VKTPNAME]; 1 ) ) >= 97 && UNICODE( LEFT( DIM_TRAVELEMPLOYEE[VKTPNAME]; 1 ) ) <= 122; LEFT(DIM_TRAVELEMPLOYEE[VKTPNAME]; 3) & REPT("*"; LEN(DIM_TRAVELEMPLOYEE[VKTPNAME]) - 3); "NO DATA" ) Regards, FaikarSolved732Views0likes4CommentsRLS - Custom message for no access
Hello all, I would like to know if there is a way to customise an end-user message when a user cannot see the data because of the RLS. I would like to explain. Users see all the data at the highest level of granularity, however, during a drill-through, to see the detail, some users will not be able to see the data. When this is the case they see an empty table. Is it possible to display a custom message, to tell them that they don't have the rights? Otherwise they may think there is a problem and that no data is displayed. Thanks in advance for your feedback, Have a nice day, VivienSolved3.4KViews4likes4CommentsHow to restrict access of dashboards using single Datasets
Hi Experts, I have developed 8+ Dashboards using single datasets and users almost 200+ are using all dashboards but I want to give some specific dashboards to specific users as have implemented the RLS as whenever I add users in RLS list it is allowing to access all dashboards. I want to add in RLS but provie acccess only some specific dashboard. Is it possible ? amitchandak Reza Microsoft Member123456 PBCommunity lbendlin Ashish_Mathur Ritaf1983 Greg_Deckler787Views0likes4CommentsRLS based on 3 columns (All possible combinations)
Hi All, Looking to implement RLS that is based on 3 columns. So all possible combinations must be taken in to account while filtering. Consider the below table, the user could fall in either: - None of the columns, OR - Any 1 column, OR - Any 2 columns, OR - All 3 columns I am using an excel to capture the role against email IDs but can't crack the DAX yet in Manage Roles, any leads with the DAX will be really helpful.479Views0likes2CommentsNeed help displaying custom message for users with no access to Power BI embedded dashboard
Hi community, I'm working on a web application that redirects to a Power BI dashboard with Row-Level Security (RLS) applied. I want to improve the user experience by displaying a custom message instead of broken visuals when users lack access based on RLS. Ideally, the message would suggest contacting support (e.g., "Contact support team @ XYZ"). I tried to achieve this by using DAX measure but the visuals break. Can anyone advise on how to achieve this? My current approach results in users seeing broken visuals, which isn't helpful. Thanks, AnthonyJosephSolved3.5KViews0likes4CommentsMDS Override Dax Query
Hi, One of my ex-colleague designed the below DAX query for the access override roles in the analysis service to provide additional access to the selected colleagues based on the superior they have access to. We recently realized that DAX is only returning two override values (MAX &MIN) and is skipping all the others leading to limiting the override access for a particular colleague to only 2 even if that colleague has permission to override more than two. DAX:(PATHCONTAINS( HR_Supervisory_Org[Path*], MAXX(FILTER(HR_Supervisory_Org,HR_Supervisory_Org[LoginId] = USERNAME()),HR_Supervisory_Org[Colleague ID]) ) ) || (PATHCONTAINS( HR_Supervisory_Org[Path*], MAXX(FILTER(HR_Supervisory_Org,RELATED(Sup_Org_RLS_Override[Business Manager 1 Login Id]) = USERNAME()),HR_Supervisory_Org[Colleague ID]) ) ) || (PATHCONTAINS( HR_Supervisory_Org[Path*], MAXX(FILTER(HR_Supervisory_Org,RELATED(Sup_Org_RLS_Override[Business Manager 2 Login Id]) = USERNAME()),HR_Supervisory_Org[Colleague ID]) ) ) || (PATHCONTAINS( HR_Supervisory_Org[Path*], MAXX(FILTER(HR_Supervisory_Org,RELATED(Sup_Org_RLS_Override[Business Manager 3 Login Id]) = USERNAME()),HR_Supervisory_Org[Colleague ID]) ) ) || (PATHCONTAINS( HR_Supervisory_Org[Path*], MINX(FILTER(HR_Supervisory_Org,RELATED(Sup_Org_RLS_Override[Business Manager 1 Login Id]) = USERNAME()),HR_Supervisory_Org[Colleague ID]) ) ) || (PATHCONTAINS( HR_Supervisory_Org[Path*], MINX(FILTER(HR_Supervisory_Org,RELATED(Sup_Org_RLS_Override[Business Manager 2 Login Id]) = USERNAME()),HR_Supervisory_Org[Colleague ID]) ) ) || (PATHCONTAINS( HR_Supervisory_Org[Path*], MINX(FILTER(HR_Supervisory_Org,RELATED(Sup_Org_RLS_Override[Business Manager 3 Login Id]) = USERNAME()),HR_Supervisory_Org[Colleague ID]) ) ) I have tried distinct and rankx but it seems I'm not using it properly and hence is giving error. Please help me in getting the issue fixed. The goal is to get all the colleague ID whose access is permitted to the one who is logging in instead of getting just the highest colleague id and lowest colleague id which is happening now. Please let me know if I need to add more info.Solved715Views0likes1CommentDynamic RLS for users based on a column value with non-unique values
Hello everyone, I'm trying to implement a holiday tracking PowerBI Report that has a dimension table with all the staff names and their respective department, please see below for an example: I was wondering if there was any DAX I can use in the RLS Security Role Editor to dynamically filter the report to the department based on the user that is accessing the report. So say if Staff Member A was the view the report, all the visuals would be dynamically filtered to be Department 1 instead of just for Staff Member A. Similar to if Staff Member H was to view the report, the visuals would be filtered to be Department 5 It needs to be set up this way so everyone in a single department can view other staff members holiday within that department, however users should not be able to see holidays cross-department. The only workaround I can currently think of is to create a Security Role PER Deparment and add each user manually to each security role (please see below), however we have an exponentially increasing Staff Dimension table so this way will result in alot of manual overhead from our administrator. It is also worth noting that within the staff table of the report we store an email adress in the idential format to what the USERPRINCIPALNAME() function outputs. So in an ideal world I would have 1 Security Role we can add people to, the report would then extract the value for whichever department is assigned to that staff member based on USERPRINCIPALNAME(), and then filter the report to whatever department that staff member is assigned to Any help is much appreciatedSolved1.8KViews0likes3Commentsusing slicer to highlight only the values of the selection
Hi, I know the basic concepts of Row Level Security (RLS) where selected users can see only their relevant data while other users data will be completely blinded. But I want to show other users data to the selected user while their name will be blinded but not the data values. So, the idea is when I select a user from the slicer it will show PBI visuals with the relevant data of all users but mask will other users name. Not sure if it can be doable in other ways, feel free to share your ideas here here is the following visual that I want to implement:Solved1.5KViews0likes6Comments