Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Microsoft Power BI Cookbook. - Second Edition

You're reading from  Microsoft Power BI Cookbook. - Second Edition

Product type Book
Published in Sep 2021
Publisher Packt
ISBN-13 9781801813044
Pages 656 pages
Edition 2nd Edition
Languages
Authors (2):
Gregory Deckler Gregory Deckler
Profile icon Gregory Deckler
Brett Powell Brett Powell
Profile icon Brett Powell
View More author details

Table of Contents (16) Chapters

Preface Configuring Power BI Tools Accessing and Retrieving Data Building a Power BI Data Model Authoring Power BI Reports Working in the Service Getting Serious with Date Intelligence Parameterizing Power BI Solutions Implementing Dynamic User-Based Visibility in Power BI Applying Advanced Analytics and Custom Visuals Administering and Monitoring Power BI Enhancing and Optimizing Existing Power BI Solutions Deploying and Distributing Power BI Content Integrating Power BI with Other Applications Other Book You May Enjoy
Index

Converting static queries to dynamic functions

In addition to the standard library of functions available to M queries, user-defined functions can be created to encapsulate the logic of queries for dynamic application against parameter inputs. Like SQL-stored procedures, M functions can be created with or without input parameters, which can be required or optional. Additionally, as functions are values in the M language, just like table and list values, they can be invoked on demand and in multiple areas within a given Power BI data model.

In this recipe, a function is created to support the integration of a list of employee IDs maintained outside the data warehouse environment. The function accepts the employee ID values as parameter inputs and retrieves related column values.

Getting ready

To prepare for this recipe, follow these steps:

  1. Download Employees.xlsx from the following GitHub repository: https://github.com/PacktPublishing/Microsoft-Power-BI-Cookbook...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}