The best Power Query and M documentation – Introducing PowerQuery.how

March 11, 2024
Denis Selimovic
Power Query / Mcomment 3Created with Sketch Beta.0 comments

This post is also available in: German

A good documentation is essential in order to work efficiently in IT. Sometimes a software manufacturer does a good job and sometimes there are alternatives, that do an even better job.

Since a long time there is an amazing alternative documentation to DAX with dax.guide, but there was absolutely no alternative Power Query documentation – until now. Since already many month there is a really great alternative to the official Power Query documentation, it’s called PowerQuery.how and to be honest, it doesn’t get the credit it deserves! So I try to change that with this article.

Current status of Power Query documentation

You might ask yourself what is wrong with the official M or Power Query documentation from Microsoft. And in general the answer is nothing, there is nothing wrong with the official documentation. It shows all functions and adds a lot of context.

But PowerQuery.how is just doing it better! Let me elaborate in the next chapter.

What is PowerQuery.how ?

As already menioned, PowerQuery.how is an alternative documentation to the official Microsoft Documentation. It was developed by our well known and highly appreciated BI Gorilla Rick de Groot, an absolute expert in Power Query!

Better example and description of functions

In general PowerQuery.how is explaining the functions better and is providing a lot more detailed examples. Let’s use the function Table.ReplaceValue from the article One-step conditional value replacement in a column in Power Query as an example.

Table.ReplaceValue as example in the Microsoft documentation

Let’s first take a look at the function in the official Microsoft Documentation.

image

We get the syntax of the function and a short description of the function in the about section. The description says it “Replaces oldValue with newValue in the specified columns of the table”. That’s a short summary and the syntax tells us in which format the parameters have to be:

Table.ReplaceValue(table as table, oldValue as any, newValue as any, replacer as function, columnsToSearch as list) as table

The first three parameters are kind of self-explanatory, but what exactly does “replacer as function” mean and how do I use the “columnsToSearch as list” in the last parameter?

In my opinion, the official documentation is lacking here a little bit of explanations. We have some examples in the article. The first example is using the function Replacer.ReplaceValue:

image

The second example is using the function Replacer.ReplaceText as the “replacer” parameter:

image 1

But it doesn’t give any explanation. I have to find out myself what that should mean.

Table.ReplaceValue as example in the PowerQuery.how documentation

Let’s take a look how PowerQuery.how is explaining the function!

Proper description of the function

The first difference is that we get a short description of the function. This helps to understand what the function is really doing. in addition you also get a compatibility list with small icons:

image 2

Afterwards we also see the Syntax, but first of all I see the parameters each in a new row and second, I have underneath a table that is describing each parameter in a few sentences:

image 3

Let’s skip the first 3 parameters as they are self explanatory and focus on the forth one, the “Replacer”. Here I get the information that this is the methos of replacement and I can choose between the Replacer.ReplaceValue and Replacer.ReplaceText (with a link to a more detailed explanation) and the hint that I could also use a custom comparer function.

And eventually I also get an explanation about the last parameter, that that’s just the column or columns, that will be searched for.

Then an even longer descriptions follows before we’re taking a look at the examples:

image 4

A lot of detailed examples

One of the biggest advantages of PowerQuery.how are the really detailed examples. Let’s take a look at the first example.

PowerQuery.how is first describing the scenario and afterward the two solutions with both Replacer-functions. It’s showing the result and you can copy the whole M-code and try it yourself!

Honestly, isn’t that amazing! This adds so much more understanding for the function!

After the basic explanation, there are many more examples. For this fuction there are:

  • Conditionally replace values
  • Replace every value in a column
  • Replacement with precision
  • How to create a custom Replacer function

Each of these examples are like tiny blog articles that describe the case. They are as long as they have to be and as short as they can be!

And the best thing, all of this exists for every function in M and is completely free!

Additional  explanations of common scenarios

Next to the very detailed descriptions of the every M function, the website also has different guides and basic explanation of Power BI.

For example there is an article that describes all of the different data types in Power Query in detail, an explanations of the operators in Power Query or the most common error messages.

Summary

After all the good words that I write here about PowerQuery.how, you might ask yourself if I get anything out of this “advertisement” or if I’m paid to do that. And the answer is no. As everything in this blog, it’s just my very honest and open opinion. PowerQuery.how helped me to understand the M language a lot better and I think Rick is doing an amazing job!

I am convinced that it can help everyone working with Power Query. So I am happy to share this website, hopefully I can introduce it to more people and help you to be a better Power Query user!

What do you think about PowerQuery.how? Let me know in the comments!