Press "Enter" to skip to content

Category: Power BI

Window Functions in DAX

Marco Russo and Alberto Ferrari lay out the foundations of window functions:

Window functions by themselves do not increase the expressivity of DAX. Most if not all of the calculations performed with window functions can be expressed with more complex DAX code. The goal is to simplify authoring these calculations and improve their performance.

These new functions also introduce a new concept to the DAX language: “apply semantics”. We will publish more articles about window functions and “apply semantics” over time. SQLBI+ subscribers will get a dedicated video course later this year and already have access to the window functions whitepaper we are currently writing.

Click through for an introduction.

Comments closed

Minimizing Cross-Highlighting on Direct Query

Dany Hoter explains why cross filtering might not be the best when you are using Direct Query in Power BI:

Every time a user clicks on a row or a column in a visual, every other visual in the page feels an urge to refresh itself and respond to the click.

Visual that are based on direct query may issue multiple queries for each refresh.

Depending on the number of measures used in the visual, the number of generated queries can be as high as 10 or even more for a single visual.

Read on for more information and what you can do to avoid this problem.

Comments closed

Passing Power BI Report Values to Dynamic M Parameters

Chris Webb explains how to let end users work with Dynamic M parameters:

Dynamic M parameters are incredibly useful in Power BI when using DirectQuery mode because they allow you to pass values from your report direct to your data source query, bypassing Power BI’s own SQL (or whatever query language your source uses) generation layer. However it isn’t obvious how to pass any value you want: dynamic M parameters must be bound to slicers or filters, and they must be bound to tables in your dataset, which means that at first glance it seems like you can only pass values that are already present somewhere in your dataset (for example in a dimension table) to a dynamic M parameter. This isn’t true though: there is a way to allow passing of any value your users enter to a dynamic M parameter and in this post I’ll show you how.

Click through for an explanation of why you might want to do this, as well as a demonstration of how you can.

Comments closed

Comparative Data Type Efficiency in Power BI

Soheil Bakhshi doesn’t want everything in Power BI to be decimals and strings:

In my consulting experience working with customers using Power BI, many challenges that Power BI developers face are due to negligence to data types. Here are some common challenges that are the direct or indirect results of inappropriate data types and data type conversion:

  • Getting incorrect results while all calculations in your data model are correct.
  • Poor performing data model.
  • Bloated model size.
  • Difficulties in configuring user-defined aggregations (agg awareness).
  • Difficulties in setting up incremental data refresh.
  • Getting blank visuals after the first data refresh in Power BI service.

Read on for a dive into these problems.

Comments closed

Building a Generic Percent of Grand Total in DAX

Leo Tachev isn’t down with the copy-pasta:

Suppose you need to calculate a percentage of grand total measure. Easy, you can use the Power BI “Show value as” without any DAX, right? Now suppose that you have 50 Table visuals and each of them require the same measure to be shown as a percentage of total. Although it requires far more clicks, “Show value as” is still not so bad for avoiding the DAX rabbit hole. But what about if you need this calculation in another measure, such as to implement a weighted average? Now, you can’t reference the Microsoft-generated field because it’s not implemented as a measure.

Click through for one solution.

Comments closed

Minimizing Calculated Column Usage in Power BI

Ed Hansberry wants us to slow down and think:

First off I want to make sure it is clear that I am not saying “never use calculated columns.” I am not. What I am saying is they should be avoided, and there are several reasons. I am going to focus on the model size, and thus performance. Note that the data I am going to show is a contrived set of data for demonstration purposes only to explain.

Read the whole thing, including a set of questions you might want to ask yourself before deploying that PBIX file with calculated columns in it.

Comments closed

Power BI Publish to Web

Reza Rad takes us through the Publish to Web option in Power BI:

Publish to the web is an easy way of sharing public data. However, it has some disadvantages as well. In this article and video, you will learn about this feature in more detail, and you will learn this feature is, and how it is different from Power BI Embedded. It will be a very long article if you want to learn about both Power BI Embedded and Publish to the web and compare them here. So in this article, I’ll explain Publish to Web, and in another article, you’ll learn about Power BI embedded and their differences. In this article, you will learn how easy it is to share your report with the public through a web page which can be your blog post, an HTML page, or any other web page. Some frequently asked questions about this feature are answered through the content of this article. If you like to learn more about Power BI, read Power BI online book, from Rookie to Rock Star.

Read on for the video as well as a full-length article.

Comments closed

Dashboard Sharing in Power BI

Reza Rad takes us through one form of data sharing in Power BI:

Power BI provides multiple ways of sharing content with users. Each sharing method has pros and cons and can be used for specific scenarios. Some sharing methods can be used together to build a framework for sharing. This article and video discuss the most basic way to share Power BI content. This method is called Dashboard (or Report) Sharing. Dashboard sharing is the easiest way of sharing; however, it may not always be the best way. In this article and video, you’ll learn how this method works, you will learn about the pros and cons of this method, and the scenarios of using it.

Click through for a video and article.

Comments closed

Unpivoting a Multi-Field Matrix in Power BI

Meagan Longoria gets out of a tricky situation:

I had to do this for a client the other day, and I realized I hadn’t blogged about it. Let’s say you need to include data in a Power BI model, but the only source of the data is a matrix that is output from another system. And that matrix has multiple fields populating the columns. An example of this is below. The matrix has fiscal year and product category on columns, vertical on rows, and the profit metric populating the values.

Read on for a step-by-step guide on how to do this.

Comments closed