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)

Filtering queries with parameters

Parameters are a primary component in building flexible, manageable query retrieval processes, as well as enabling simple filter selections. Hard coded values in queries can be replaced with parameters and a single parameter can be leveraged by multiple queries, thus reducing development time and maintenance. Additionally, parameters can be assigned data types to match data sources and can be easily adjusted via lists of predefined values, both in the Query Editor and in the Report View.

In this recipe, a parameter is used to filter a fact table query for a specified number of days relative to the current date. An additional, more advanced example is shared to apply parameters to a fact table query on both a dimension column as well as a date range.

...