{"id":1474,"date":"2020-07-15T07:02:45","date_gmt":"2020-07-15T07:02:45","guid":{"rendered":"http:\/\/bi.unija.com\/en\/?p=1474"},"modified":"2020-08-17T13:53:18","modified_gmt":"2020-08-17T13:53:18","slug":"row-level-security-in-power-bi","status":"publish","type":"post","link":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/","title":{"rendered":"Row-level security in Power BI"},"content":{"rendered":"<p><em>For Power BI version 2.76.5678.782 (December 2019).<\/em><\/p>\n<p>When handling data we need a system for handling user&#8217;s rights. We usually don&#8217;t want users to access entire database tables. Row-level security controls access at a row level. We can restrict access to rows using roles like IT, Accounting, CEO etc.<\/p>\n<h1>Roles in Power BI<\/h1>\n<p>We set roles by following the steps below.<\/p>\n<p>1. Select <strong>Modelling<\/strong> &gt; <strong>Manage Roles<\/strong>. Manage roles window opens up.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1100\" height=\"667\" class=\"wp-image-1485\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-9.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-9.png 1100w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-9-300x182.png 300w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-9-1024x621.png 1024w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-9-768x466.png 768w\" sizes=\"(max-width: 1100px) 100vw, 1100px\" \/><\/p>\n<p>2. Select <strong>Create<\/strong>.<\/p>\n<p>3. Enter roles name to <strong>Roles<\/strong>, e.g. IT Team.<\/p>\n<p>4. Select the table you want to filter, e.g. Sales.<\/p>\n<p>5. Enter DAX filter formula to <strong>Table filter DAX expression<\/strong>. E.g., if we want our IT Team role to only see rows with IT in the Project Name field, we enter <strong>[Project Name] = \u201cIT\u201d<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"725\" class=\"wp-image-1486\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-10.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-10.png 1200w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-10-300x181.png 300w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-10-1024x619.png 1024w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-10-768x464.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>6. Check the formula by selecting check mark.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"511\" height=\"49\" class=\"wp-image-1487\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-11.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-11.png 511w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-11-300x29.png 300w\" sizes=\"(max-width: 511px) 100vw, 511px\" \/><\/p>\n<p>7. Save with <strong>Save<\/strong>.<\/p>\n<h1>Testing the view for a role: View As<\/h1>\n<p>1. After setting roles, we can test how the report looks like for the selected role.<\/p>\n<p>2. Select <strong>Modelling<\/strong> &gt; <strong>View As<\/strong>.<\/p>\n<p>3. Select the role, e.g.<strong> IT Team<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"193\" height=\"182\" class=\"wp-image-1488\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-12.png\" \/><\/p>\n<p>4. Select <strong>OK<\/strong>. The report updates and shows the view for the selected role.<\/p>\n<h1>Adding and removing users in Power BI Service<\/h1>\n<p>While we can edit roles in v <strong>Power BI Desktop <\/strong>application, we can add or remove users only in <strong>Power BI Service<\/strong>.<\/p>\n<p>1. To add a user to a role follow the steps below.<\/p>\n<p>2. Select <strong>Datasets<\/strong> and the Options icon (<strong>\u2026<\/strong>).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"898\" height=\"263\" class=\"wp-image-1489\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-13.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-13.png 898w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-13-300x88.png 300w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-13-768x225.png 768w\" sizes=\"(max-width: 898px) 100vw, 898px\" \/><\/p>\n<p>3. Select <strong>Security<\/strong>. Only project owners can see <strong>Security<\/strong> tab.<\/p>\n<p>4. Enter user&#8217;s email.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"766\" height=\"349\" class=\"wp-image-1490\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-14.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-14.png 766w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-14-300x137.png 300w\" sizes=\"(max-width: 766px) 100vw, 766px\" \/><\/p>\n<p>5. Select <strong>Add.<\/strong><\/p>\n<h2>Deleting user<\/h2>\n<p>We delete a user by selecting Delete symbol.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"360\" class=\"wp-image-1491\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-15.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-15.png 756w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-15-300x143.png 300w\" sizes=\"(max-width: 756px) 100vw, 756px\" \/><\/p>\n<h1>Testing the view for a role in Power BI Service<\/h1>\n<p>We can also test the view for a role in Power BI service. We follow the steps below.<\/p>\n<p>1. Select the Options icon (<strong>\u2026<\/strong>).<\/p>\n<p>2. Select<strong> Test as role<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"774\" height=\"365\" class=\"wp-image-1492\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-16.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-16.png 774w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-16-300x141.png 300w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-16-768x362.png 768w\" sizes=\"(max-width: 774px) 100vw, 774px\" \/><\/p>\n<p>3. We get the list of report pages, assigned to current roles. We can observe reports as the selected roles sees it. Dashboards are not included.<\/p>\n<p>4. We can select <strong>Now viewing as<\/strong> to change the role.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"564\" class=\"wp-image-1493\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-17.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-17.png 864w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-17-300x196.png 300w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/07\/word-image-17-768x501.png 768w\" sizes=\"(max-width: 864px) 100vw, 864px\" \/><\/p>\n<p>5. To return to normal view, se select <strong>Back to Row-Level Security<\/strong> in upper left corner.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For Power BI version 2.76.5678.782 (December 2019). When handling data we need a system for handling user&#8217;s rights. We usually don&#8217;t want users to access entire database tables. Row-level security controls access at a row level. We can restrict access<\/p>\n","protected":false},"author":5,"featured_media":1211,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[8],"class_list":["post-1474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-intermediate","tag-power-bi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Row-level security in Power BI - Bi Unija<\/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:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Row-level security in Power BI - Bi Unija\" \/>\n<meta property=\"og:description\" content=\"For Power BI version 2.76.5678.782 (December 2019). When handling data we need a system for handling user&#8217;s rights. We usually don&#8217;t want users to access entire database tables. Row-level security controls access at a row level. We can restrict access\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/\" \/>\n<meta property=\"og:site_name\" content=\"Bi Unija\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-15T07:02:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-17T13:53:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/06\/ENG13.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"720\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Branka Trifunovi\u0107\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Branka Trifunovi\u0107\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/\",\"url\":\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/\",\"name\":\"Row-level security in Power BI - Bi Unija\",\"isPartOf\":{\"@id\":\"https:\/\/bi.unija.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/06\/ENG13.jpg\",\"datePublished\":\"2020-07-15T07:02:45+00:00\",\"dateModified\":\"2020-08-17T13:53:18+00:00\",\"author\":{\"@id\":\"https:\/\/bi.unija.com\/en\/#\/schema\/person\/3bed36623727c7162e421c4366a54e10\"},\"breadcrumb\":{\"@id\":\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#primaryimage\",\"url\":\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/06\/ENG13.jpg\",\"contentUrl\":\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/06\/ENG13.jpg\",\"width\":720,\"height\":480},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/bi.unija.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Row-level security in Power BI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bi.unija.com\/en\/#website\",\"url\":\"https:\/\/bi.unija.com\/en\/\",\"name\":\"Bi Unija\",\"description\":\"Just another Bi site\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bi.unija.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/bi.unija.com\/en\/#\/schema\/person\/3bed36623727c7162e421c4366a54e10\",\"name\":\"Branka Trifunovi\u0107\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bi.unija.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ec99f651bcc98a163161515ec254b974?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ec99f651bcc98a163161515ec254b974?s=96&d=mm&r=g\",\"caption\":\"Branka Trifunovi\u0107\"},\"url\":\"https:\/\/bi.unija.com\/en\/author\/branka\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Row-level security in Power BI - Bi Unija","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:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/","og_locale":"en_US","og_type":"article","og_title":"Row-level security in Power BI - Bi Unija","og_description":"For Power BI version 2.76.5678.782 (December 2019). When handling data we need a system for handling user&#8217;s rights. We usually don&#8217;t want users to access entire database tables. Row-level security controls access at a row level. We can restrict access","og_url":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/","og_site_name":"Bi Unija","article_published_time":"2020-07-15T07:02:45+00:00","article_modified_time":"2020-08-17T13:53:18+00:00","og_image":[{"width":720,"height":480,"url":"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/06\/ENG13.jpg","type":"image\/jpeg"}],"author":"Branka Trifunovi\u0107","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Branka Trifunovi\u0107","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/","url":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/","name":"Row-level security in Power BI - Bi Unija","isPartOf":{"@id":"https:\/\/bi.unija.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#primaryimage"},"image":{"@id":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#primaryimage"},"thumbnailUrl":"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/06\/ENG13.jpg","datePublished":"2020-07-15T07:02:45+00:00","dateModified":"2020-08-17T13:53:18+00:00","author":{"@id":"https:\/\/bi.unija.com\/en\/#\/schema\/person\/3bed36623727c7162e421c4366a54e10"},"breadcrumb":{"@id":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#primaryimage","url":"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/06\/ENG13.jpg","contentUrl":"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2020\/06\/ENG13.jpg","width":720,"height":480},{"@type":"BreadcrumbList","@id":"https:\/\/bi.unija.com\/en\/row-level-security-in-power-bi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bi.unija.com\/en\/"},{"@type":"ListItem","position":2,"name":"Row-level security in Power BI"}]},{"@type":"WebSite","@id":"https:\/\/bi.unija.com\/en\/#website","url":"https:\/\/bi.unija.com\/en\/","name":"Bi Unija","description":"Just another Bi site","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bi.unija.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bi.unija.com\/en\/#\/schema\/person\/3bed36623727c7162e421c4366a54e10","name":"Branka Trifunovi\u0107","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bi.unija.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ec99f651bcc98a163161515ec254b974?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ec99f651bcc98a163161515ec254b974?s=96&d=mm&r=g","caption":"Branka Trifunovi\u0107"},"url":"https:\/\/bi.unija.com\/en\/author\/branka\/"}]}},"_links":{"self":[{"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/posts\/1474"}],"collection":[{"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/comments?post=1474"}],"version-history":[{"count":4,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/posts\/1474\/revisions"}],"predecessor-version":[{"id":1521,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/posts\/1474\/revisions\/1521"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/media\/1211"}],"wp:attachment":[{"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/media?parent=1474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/categories?post=1474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/tags?post=1474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}