{"id":26398,"date":"2024-11-15T14:26:00","date_gmt":"2024-11-15T13:26:00","guid":{"rendered":"https:\/\/alistar.net\/?p=26398"},"modified":"2026-10-02T10:52:44","modified_gmt":"2026-10-02T08:52:44","slug":"row-level-security-and-security-filtering-behavior","status":"publish","type":"post","link":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/","title":{"rendered":"Row-level security and security filtering behavior"},"content":{"rendered":"<p class=\"wp-block-paragraph\">With row-level security, data-based filtering can easily be added to a semantic model. By using the logged-in user\u2019s username, this can also be made dynamic. Of course, much has already been written about this. Recently, however, I was asked to configure the security so that users at a higher level could always view all data, but at the detailed level, only the information pertaining to their own team or department. To clarify: At the top-level, users should be able to view all revenue, but at the detailed level, only customers in the Netherlands.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is RLS?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Role-based security involves filtering data based on specific security rules. This is often implemented in Power BI by defining different roles. Data can then be filtered within these roles. Users are only allowed to view data from a specific company, a specific country, or a specific business unit. By making this security dependent on the user, maintenance and the number of roles can be significantly reduced.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Security Filtering Behavior<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The way the model interprets security can be influenced by the \u201csecurity filtering behavior\u201d setting. This setting can be configured on a per-relationship basis. This can be automated using scripting, if desired. There are three basic settings available:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>One Direction<\/strong><br>Records filtered on the \u201cTo\u201d side of the relationship automatically filter the records on the \u201cFrom\u201d side<\/li>\n\n\n\n<li><strong>BothDirections<\/strong><br>Filtering on either side of the relationship affects filtering on the other side.&nbsp;<\/li>\n\n\n\n<li><strong>None<\/strong><br>No filtering takes place on either side of the relationship.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">As an example, I used a model with dynamic filtering based on the customer's country. Row-level filtering is configured on the customer table. The test user has access only to customers in the Netherlands. This user is not allowed to view the other customers.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">One Direction<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The default security setting is \u201cOneDirection.\u201d This means that the customer table is filtered to show only customers in the Netherlands. The relationship runs from the fact table (revenue) to the customer. Therefore, the fact table is also filtered to show only customers from the Netherlands. Consequently, the revenue displayed in the various tables is limited to revenue from the Netherlands. The filtering applies only to relationships with the customer table; therefore, the slicer containing contact information is not filtered.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">BothDirections<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;Using the \u201cBothDirections\u201d setting filters the tables on both sides of a relationship. The relationship between the fact table and the customer table is already filtered on the \u201cTo\u201d side using RLS. Therefore, this relationship does not need to be set to \u201cBothDirections.\u201d However, if we set the relationship between the facts table and the contacts table to \u201cBothDirections,\u201d we see that the slicer for the customer field is also filtered. As a result, the user now only sees contacts associated with Dutch customers.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">None<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Setting the security setting to \u201cNone\u201d means that filtering based on a relationship no longer occurs. Because row-level security is enabled on the customer table, users can view the full revenue in the fact table, but when viewed at the customer level, only the Netherlands is displayed. This ensures that the full figures can be viewed at the top-level, but not at the detailed level.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Security Testing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Power BI service makes it easy to test security. You can read more about this in a previous <a href=\"https:\/\/alistar.net\/en\/security-in-de-power-bi-service\/\">blog <\/a>that I wrote. The security testing process has since been modified slightly. Now, when testing a role as a specific user, you can also switch between reports. However, the reports must be in the same workspace.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By adjusting the various security settings, you can customize the filtering exactly to your liking. The default filtering is often sufficient for most needs, but this behavior can be adjusted if necessary. This can be particularly useful for hiding certain detailed information. <\/p>","protected":false},"excerpt":{"rendered":"<p>With row-level security, data-driven filtering can be easily added to a semantic model. By using the username of the logged-in user, this can also be made dynamic. <\/p>","protected":false},"author":16,"featured_media":28499,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[27],"tags":[203],"industrie-type":[],"interesses":[],"techologie":[],"alistar_language":[],"class_list":["post-26398","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-nl","tag-powerbi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Row-level security en security filtering behavior - Alistar<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/alistar.net\/en\/blog\/row-level-security-and-security-filtering-behavior\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Row-level security en security filtering behavior - Alistar\" \/>\n<meta property=\"og:description\" content=\"Met row-level security kan eenvoudig op data gebaseerde filtering worden toegevoegd aan een semantisch model. Door gebruik te maken van de gebruikersnaam van de ingelogde gebruiker kan dit ook dynamisch worden gemaakt.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/alistar.net\/en\/blog\/row-level-security-and-security-filtering-behavior\/\" \/>\n<meta property=\"og:site_name\" content=\"Alistar\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-15T13:26:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-02T08:52:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/alistar.net\/wp-content\/uploads\/2024\/11\/shutterstock_2476398693-scaled.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1238\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Shardae Castelen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shardae Castelen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/\"},\"author\":{\"name\":\"Shardae Castelen\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#\\\/schema\\\/person\\\/3c047614ccf88bd8927ae653882b3b50\"},\"headline\":\"Row-level security en security filtering behavior\",\"datePublished\":\"2024-11-15T13:26:00+00:00\",\"dateModified\":\"2026-10-02T08:52:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/\"},\"wordCount\":676,\"publisher\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/alistar.net\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/shutterstock_2476398693-scaled.webp\",\"keywords\":[\"Power BI\"],\"articleSection\":[\"Blog NL\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/\",\"url\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/\",\"name\":\"Row-level security en security filtering behavior - Alistar\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/alistar.net\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/shutterstock_2476398693-scaled.webp\",\"datePublished\":\"2024-11-15T13:26:00+00:00\",\"dateModified\":\"2026-10-02T08:52:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/#primaryimage\",\"url\":\"https:\\\/\\\/alistar.net\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/shutterstock_2476398693-scaled.webp\",\"contentUrl\":\"https:\\\/\\\/alistar.net\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/shutterstock_2476398693-scaled.webp\",\"width\":2560,\"height\":1238},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/blog\\\/row-level-security-en-security-filtering-behavior\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/alistar.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Row-level security en security filtering behavior\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/alistar.net\\\/en\\\/\",\"name\":\"Alistar\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/alistar.net\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#organization\",\"name\":\"Alistar\",\"url\":\"https:\\\/\\\/alistar.net\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/alistar.net\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/favicon-new.svg\",\"contentUrl\":\"https:\\\/\\\/alistar.net\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/favicon-new.svg\",\"width\":260,\"height\":260,\"caption\":\"Alistar\"},\"image\":{\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/alistar\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/alistar.net\\\/en\\\/#\\\/schema\\\/person\\\/3c047614ccf88bd8927ae653882b3b50\",\"name\":\"Shardae Castelen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/da4b715240dd773d96635e681af70c4ca1c2efba4cbeddc37b21e50dc5fc9b0c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/da4b715240dd773d96635e681af70c4ca1c2efba4cbeddc37b21e50dc5fc9b0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/da4b715240dd773d96635e681af70c4ca1c2efba4cbeddc37b21e50dc5fc9b0c?s=96&d=mm&r=g\",\"caption\":\"Shardae Castelen\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Row-level security and security filtering behavior - Alistar","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/alistar.net\/en\/blog\/row-level-security-and-security-filtering-behavior\/","og_locale":"en_US","og_type":"article","og_title":"Row-level security en security filtering behavior - Alistar","og_description":"Met row-level security kan eenvoudig op data gebaseerde filtering worden toegevoegd aan een semantisch model. Door gebruik te maken van de gebruikersnaam van de ingelogde gebruiker kan dit ook dynamisch worden gemaakt.","og_url":"https:\/\/alistar.net\/en\/blog\/row-level-security-and-security-filtering-behavior\/","og_site_name":"Alistar","article_published_time":"2024-11-15T13:26:00+00:00","article_modified_time":"2026-10-02T08:52:44+00:00","og_image":[{"width":2560,"height":1238,"url":"https:\/\/alistar.net\/wp-content\/uploads\/2024\/11\/shutterstock_2476398693-scaled.webp","type":"image\/webp"}],"author":"Shardae Castelen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Shardae Castelen","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/#article","isPartOf":{"@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/"},"author":{"name":"Shardae Castelen","@id":"https:\/\/alistar.net\/en\/#\/schema\/person\/3c047614ccf88bd8927ae653882b3b50"},"headline":"Row-level security en security filtering behavior","datePublished":"2024-11-15T13:26:00+00:00","dateModified":"2026-10-02T08:52:44+00:00","mainEntityOfPage":{"@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/"},"wordCount":676,"publisher":{"@id":"https:\/\/alistar.net\/en\/#organization"},"image":{"@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/#primaryimage"},"thumbnailUrl":"https:\/\/alistar.net\/wp-content\/uploads\/2024\/11\/shutterstock_2476398693-scaled.webp","keywords":["Power BI"],"articleSection":["Blog NL"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/","url":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/","name":"Row-level security and security filtering behavior - Alistar","isPartOf":{"@id":"https:\/\/alistar.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/#primaryimage"},"image":{"@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/#primaryimage"},"thumbnailUrl":"https:\/\/alistar.net\/wp-content\/uploads\/2024\/11\/shutterstock_2476398693-scaled.webp","datePublished":"2024-11-15T13:26:00+00:00","dateModified":"2026-10-02T08:52:44+00:00","breadcrumb":{"@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/#primaryimage","url":"https:\/\/alistar.net\/wp-content\/uploads\/2024\/11\/shutterstock_2476398693-scaled.webp","contentUrl":"https:\/\/alistar.net\/wp-content\/uploads\/2024\/11\/shutterstock_2476398693-scaled.webp","width":2560,"height":1238},{"@type":"BreadcrumbList","@id":"https:\/\/alistar.net\/en\/blog\/row-level-security-en-security-filtering-behavior\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/alistar.net\/"},{"@type":"ListItem","position":2,"name":"Row-level security en security filtering behavior"}]},{"@type":"WebSite","@id":"https:\/\/alistar.net\/en\/#website","url":"https:\/\/alistar.net\/en\/","name":"Alistar","description":"","publisher":{"@id":"https:\/\/alistar.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/alistar.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/alistar.net\/en\/#organization","name":"Alistar","url":"https:\/\/alistar.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/alistar.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/alistar.net\/wp-content\/uploads\/2025\/07\/favicon-new.svg","contentUrl":"https:\/\/alistar.net\/wp-content\/uploads\/2025\/07\/favicon-new.svg","width":260,"height":260,"caption":"Alistar"},"image":{"@id":"https:\/\/alistar.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/alistar\/"]},{"@type":"Person","@id":"https:\/\/alistar.net\/en\/#\/schema\/person\/3c047614ccf88bd8927ae653882b3b50","name":"Shardae Castelen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/da4b715240dd773d96635e681af70c4ca1c2efba4cbeddc37b21e50dc5fc9b0c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/da4b715240dd773d96635e681af70c4ca1c2efba4cbeddc37b21e50dc5fc9b0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/da4b715240dd773d96635e681af70c4ca1c2efba4cbeddc37b21e50dc5fc9b0c?s=96&d=mm&r=g","caption":"Shardae Castelen"}}]}},"_links":{"self":[{"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/posts\/26398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/comments?post=26398"}],"version-history":[{"count":1,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/posts\/26398\/revisions"}],"predecessor-version":[{"id":75630,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/posts\/26398\/revisions\/75630"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/media\/28499"}],"wp:attachment":[{"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/media?parent=26398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/categories?post=26398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/tags?post=26398"},{"taxonomy":"industrie-type","embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/industrie-type?post=26398"},{"taxonomy":"interesses","embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/interesses?post=26398"},{"taxonomy":"techologie","embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/techologie?post=26398"},{"taxonomy":"alistar_language","embeddable":true,"href":"https:\/\/alistar.net\/en\/wp-json\/wp\/v2\/alistar_language?post=26398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}