Book Image

Microsoft Power BI Cookbook

By : Author Test, Brett Powell
Book Image

Microsoft Power BI Cookbook

By: Author Test, Brett Powell

Overview of this book

Microsoft Power BI is a business intelligence and analytics platform consisting of applications and services designed to provide coherent, visual and interactive insights of data. This book will provide thorough, technical examples of using all primary Power BI tools and features as well as demonstrate high impact end-to-end solutions that leverage and integrate these technologies and services. Get familiar with Power BI development tools and services, go deep into the data connectivity and transformation, modeling, visualization and analytical capabilities of Power BI, and see Power BI’s functional programming languages of DAX and M come alive to deliver powerful solutions to address common, challenging scenarios in business intelligence. This book will excite and empower you to get more out of Power BI via detailed recipes, advanced design and development tips, and guidance on enhancing existing Power BI projects.
Table of Contents (14 chapters)

Capturing the current user context of Power BI content

The foundation of dynamic user security and visibility in Power BI is the ability to extract the user principal name (UPN) or login credential of the business user connected to content in the Power BI service. The USERPRINCIPALNAME() DAX function retrieves this text value and thus enables filter expressions to be applied to the tables of a model in security roles. In addition to RLS roles which override and impact all DAX measures of a dataset, the UPN or "current user" text value can be used by other DAX measures, such as retrieving the UPN prefix and suffix and even filtering other measures per the final recipe in this chapter, Avoiding manual user clicks with user-based filtering logic.

In this recipe, DAX measures are added to a data model to dynamically retrieve the UPN, as well as its prefix and suffix. Additional...