This post is also available in: Deutsch

Pretty much since I started the blog, I’ve been gradually sharing my code snippets for DAX and M here on the website. As the list got longer and longer and more and more confusing with all the examples, I decided to maintain and publish the code snippets on GitHub from now on.

There I can provide and maintain them much more organized. As usual, I’ll add new examples to the list as I come across something that might be useful for you.

The snippets are available on::

https://github.com/selimovd/PowerBISnippets/

This post is also available in: Deutsch

I like working pretty much with the what-if parameter in Power BI. With the help of this, it is possible to run through corresponding scenarios in a very fine-grained manner. What would my operating result look like if I can increase my sales by a factor of 2? How would it look with 1.5? And how about 2.35? I am aware that these increases are extremes. But with the what-if parameter, such evaluations go very easily with a single slider.

Problem the what-if parameter does not work, the exact number cannot be set

However, there is occasionally the case that exact values cannot be set. Let’s take the case just mentioned as an example. I would like to evaluate the development of my sales, accurate to

This post is also available in: Deutsch

In Power BI, I repeatedly encounter the situation that it does not work to export the underlying data. The option is simply not available. In general, this can have several reasons. In the following article we will take a look at the possible reasons for this.

1. Disabling in Power BI report

The author of a report can limit the export for the specific report. For this purpose, it is possible to select in the options in Power BI Desktop whether users are allowed to export summarized data, the underlying data or no data at all:

Selection whether summarized or underlying data may be exported

2. At least build permission

This post is also available in: Deutsch

A few weeks ago, I visualised the current status of vaccinations in the canton of Basel-Stadt with Power BI in a weekend project. I have received a lot of positive feedback in response to this. Many thanks at this point for that. In addition, there were numerous requests to extend the report to cover the whole of Switzerland.

It took a few days, but the report now contains data for the entire country. The Power BI Report can still be accessed at:

https://impfstand.ch

The selection of the canton can easily be done using the navigation:

Navigation by canton on impfstand.ch
Navigation by canton on impfstand.ch

New features that are now

This post is also available in: Deutsch

This past weekend, I had an aha moment. My girlfriend asked me what the current status of COVID-19 vaccination was here in Switzerland in our area, which means in the canton of Basel-Stadt. After a short internet research, we found either newspaper articles that were already a few weeks old or statistics that presented the current figures only insufficiently or in a complex way.

The canton of Basel-Stadt provides all data as CSV and JSON on its Open Data Basel-Stadt website and allows the use under the Creative Commons license.

Current vaccination status as Power BI Report for Basel-Stadt

As a Power BI enthusiast, I immediately thought of presenting the whole thing in

This post is also available in: Deutsch

Last Friday, Microsoft released the latest Power BI update a little earlier than usual. The highlight from my point of view is the Power Automate Visual ( previously Microsoft Flow), which works with the now released April 2021 version of Power BI

What is Power Automate?

With Microsoft Power Automate it is possible to combine tasks and workflows with different applications in order to automate them. Over 300 services are now supported, for example Dropbox, Outlook, Power BI, Sharepoint, Twitter, SalesForce, etc.

Application areas can be simple notifications, but also very complex and highly automated workflows.
A few examples could be:

  • When a new record is added to a SQL Server table, push it to a Power BI Live Dataset
  • If I got linked on

This post is also available in: Deutsch

Sooner or later, every Power BI developer will face the question of how to automatically filter a specific visual or the entire report to today’s date.
This can be done in two ways:

  1. With a Calculated Column (always works)
  2. With a measure (works in specific cases)

The approach with a calculated column is much more stable, since measures generally cannot or should not be used as filters. However, if the date exists in the filter context, then this is also possible with a measure, which is why I will present both alternatives.

Filter to today’s date with calculated column

As just said, filtering by calculated column is the more stable of the two approaches. Here, a new calculated column is created in the date dimension, where it

This post is also available in: Deutsch

One topic that I think doesn’t get enough attention is the ability to automate work in Power BI with the Tabular Editor.

Especially the official documentation gives some nice insights into what the scripting engine can achieve.
I would like to present a few examples in this article.

Example 1: Automatic formatting of all measures

If you often work with Power BI, you know the situation when you open a report and all measures look like in the following picture:

Unformatted formula in DAX
Unformatted

This post is also available in: Deutsch

Although the feature has been in Power BI for a while, Measure Tables are not used enough in my opinion. Also during my trainings or in conversations with customers, I often notice that the feature has not really reached the minds of the report developers yet.

What is a Measure Table and what does it look like?

A measure table is an independent table that does not contain any columns and only the measures themselves:

Example of a Measure table
Example of a Measure table

When should I use a Measure table?

I personally use them when I have more than 4-5 measures. I find it more clear to have a large number of measures in a separate table instead

This post is also available in: Deutsch

Power BI Embedded is a great way to integrate entire reports or specific elements from a Power BI reports into a company portal. Unfortunately, this is not always easy to explain and you need some imagination to grasp how this might look in practice.

Power BI Embedded as a demo portal

However, this has recently changed as Microsoft has released a demo portal for their imaginary company Contoso. On the following website you can find a great example how to use Powe r BI Embedded in an enterprise portal.

Important here, the portal must be entered in demo mode.

Login to Contoso Power BI Embedded Portal via Demo					</div>
						</div>
				</div>
				<div class=