• Home
  • About Us
  • Contact Us
  • Privacy Policy
  • Special Offers
Business Intelligence Info
  • Business Intelligence
    • BI News and Info
    • Big Data
    • Mobile and Cloud
    • Self-Service BI
  • CRM
    • CRM News and Info
    • InfusionSoft
    • Microsoft Dynamics CRM
    • NetSuite
    • OnContact
    • Salesforce
    • Workbooks
  • Data Mining
    • Pentaho
    • Sisense
    • Tableau
    • TIBCO Spotfire
  • Data Warehousing
    • DWH News and Info
    • IBM DB2
    • Microsoft SQL Server
    • Oracle
    • Teradata
  • Predictive Analytics
    • FICO
    • KNIME
    • Mathematica
    • Matlab
    • Minitab
    • RapidMiner
    • Revolution
    • SAP
    • SAS/SPSS
  • Humor

Power BI Desktop Dynamic security cheat sheet

September 2, 2016   Self-Service BI

I recently created this simple Power BI desktop file that allows you to try out dynamic security with the new security relationship feature as described in this blog post.

The model contains the following tables:

image thumb Power BI Desktop Dynamic security cheat sheet

  • Sales – contains the metrics, the fact table
  • Group – is the dimension table that groups a set of users. This can be anything in the real world, a department, a geography, productgroup, etc
  • User – the users with their username connecting to the reports
  • UserGroup – This ties individual users to the “group”, this usually is a M:M relationship where many users belong to multiple groups.

All relationships are set to single directional filtering except the one between Group and UserGroup. This allows the filter from the User table to filter the groups down to only those groups where the current user has access to, in turn filtering out the rows in the sales table for just those groups

The report contains this a simple tablix that shows the products, sales and groups including the username and the userprinciplename (using the corresponding DAX functions) that is connecting to the model:

image thumb 1 Power BI Desktop Dynamic security cheat sheet

As you can see both return slightly different values, the userprinciplename function return the User-Principal-Name attribute from AD which is a UPN that is an Internet-style login name for a user based on the Internet standard RFC 822. Username returns the SAMAccountname which  is a logon name used to support clients and servers from previous version of Windows.

If you open the role management, there is one role in there that filters the username table using the earlier mentioned DAX USERNAME() function:

image thumb 2 Power BI Desktop Dynamic security cheat sheet

This allows you to test this inside of Power BI desktop or you can replace the username() function with any hardcoded string as well to try out how the security works. Here is a subset of the data as being secured by the role:

Capture 1024x354 Power BI Desktop Dynamic security cheat sheet

Hope this helps you get start started faster with dynamic RLS. You can download the file here: http://www.kasperonbi.com/uploads/security.zip .

Let’s block ads! (Why?)

Kasper de Jonge Microsoft BI Blog

cheat, Desktop, Dynamic, Power, Security, sheet
  • Recent Posts

    • Oracle Launches Version 21c
    • ‘Insecure’ Star Yvonne Orji To Develop Disney Plus Comedy Series
    • P2 Automation: What’s Exciting for Small Businesses in 2021?
    • IBM acquires Taos to supplement its cloud expertise as workloads shift
    • Get ready! Top Dynamics 365 Trends Coming your Way in 2021
  • Categories

  • Archives

    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
© 2021 Business Intelligence Info
Power BI Training | G Com Solutions Limited