Dynamic & bulk type transformation in Power Query, Power BI and M
This is just a quick code-share-of-the-day of different scenarios for dynamic type transformation of multiple columns at once. The syntax to transform the format of 2 columns (“Column1” and “Column2”)...
View ArticleEasy Profit & Loss (and other account) statements in PowerBI and Excel – Part2
Welcome to part 2 of my series of easy Profit & Loss and other account statements in Power BI and Excel. In the first part I introduced the general principle of creating asymmetric shaped reports...
View ArticleComfort Functions for Easy Profit & Loss statements in Power BI and Excel –...
Here comes some long awaited comfort functions for part 2 of my easy P&L series. In the first section I’ve presented the general principle on how to work with a structure using an...
View ArticleConditions in FirstN, LastN and other xN-functions in M, PowerBI and Power Query
Today I discovered that we can use conditions in many of the N-selecting functions where one/I would normally expect just a number-expression for the N: Table.RemoveFirstN( table as table, optional...
View ArticleAutomatical or Bulk- Rename Columns in Power BI and Power Query
If you want to rename all of your table’s columns with a common rule, like “replace all spaces by underscore” or just “delete all spaces”, check out this easy method: The above formula will replace all...
View ArticleKPIs in Easy Profit and Loss for PowerBI
Welcome to the last part of my Easy Profit & Loss series where I will cover KPIs in rows & columns: 1) KPIs in columns Show all your figures as a percent of turnover for example: Nice &...
View ArticleNon-linear Break-Even Analysis in PowerBI
A break-even analysis tells you at which value of the parameter in question your profit-calculation will turn positive (link). Here we need to sell at least 173 at a given price of 20 before we’ve...
View ArticleHow to expand a column that cannot be expanded in Power BI and Power Query in...
Especially when working with JSON-data, you might end up with a column that has elements of mixed types in it. The expand column – arrows will be missing, but some elements still need to be expanded,...
View ArticleShould we pipe M?
“Just because you could doesn’t mean you should”… So I’m asking the Power Query and M fans & experts here if we “should” pipe M: Background: With M you can nest your expressions like in Excel to...
View ArticleHow to import from Excel with cell coordinates in Power Query and Power BI
There might be occasions where you want to import data from Excel into Power Query or Power BI using cell coordinates like a range from E3 until G9 for example (“A1 cell reference style”). The function...
View ArticleHow to create and use an R-function-library in Power BI
Once you’ve discovered the huge potential R gives you to expand your analytical toolbox in Power BI (check some tips & tricks in my previous blogpost if you haven’t already), you might wish to have...
View ArticleHow Power Query can return clickable hyperlinks with friendly names to Excel
When you use Power Query as an Excel-automation-tool rather than just to feed the data model, you might want to return clickable hyperlinks that carry friendly names. This doesn’t work out of the box,...
View ArticleCreate a function library in Power BI using M-Extensions
Having the ability to use own M-function the same way than native functions in Power BI and Excel has been one of my biggest wishes for quite some time. So I was more than amazed to see Frank Tonsen’s...
View ArticleDate.DatesBetween to retrieve dates between 2 dates in Power BI and Power Query
Today I’m sharing a handy function with you that allows you to retrieve all or just a couple of dates between 2 given dates: Date.DatesBetween. Usage This function takes 3 parameters: From- or...
View ArticleRemove repeating characters from a string in Power BI and Power Query
Repeating spaces often cause problems when cleaning up your data. My new function “Text.RemoveRepeatingCharacters” can come to the rescue here. Imagine you have a table like this: Challenge To further...
View ArticleTable.Group: Exploring the 5th element in Power BI and Power Query
In this post I’ll show you the magic stuff you can do with the 5th parameter (the optional comparer function) of the Table.Group M-function in Power BI and Power Query: Table.Group parameters table as...
View ArticleList.SelectPositions in Power BI and Power Query
With this new custom function “List.SelectPositions” you can easily select items from a list by just passing a list of their positions within it as the parameter. What it does Say you have a list with...
View ArticleWeb Scraping 1: Combine multiple tables from one page in Power BI and Power...
This is a step-by-step description of how to combine multiple tables from one webpage into one table with categories as output. You can also apply this technique to combine tables from other sources as...
View ArticleA generic SWITCH-function for the query editor in Power BI and Power Query
Although you can easily replicate the DAX SWITCH-function via list-, table- or record functions in M, I thought it would be convenient for many newbies to have a comfortable M-SWITCH-function that uses...
View ArticleMigrate a Power Query or Power BI file to a local SSAS instance
In Visual Studio there is a wizard to migrate an Excel Power Pivot model to a SSAS model. But this will not bring over the M-queries unfortunately. But there is a workaround to achieve this. It...
View Article