RegEx in Power BI and Power Query in Excel with Java Script
From time to time Huang Caiguang sends me some geeky M-code that turns out to be very useful (like this for example). Today it’s utilizing java script code for RegEx (regular expressions): The Web.Page...
View ArticleStretching and Compressing Time Series with Power Query and Power BI
The good folks from SumProduct have published a challenge for Excel that I find worth doing in Power Query instead: The Challenge Stretching or compressing a forecast so that the proportion of the...
View ArticlePermutations table in Power BI or Power Query in Excel
Today my husband came with a special task to me: He had to re-wire an old instrument on board of our sailing boat and “lost” the original matching instructions. There were 4 cables to go into 4...
View ArticleAutomatically create function record for Expression.Evaluate in Power BI and...
Some time ago I wrote a blogpost on how to create a function library in Power BI or Power Query (http://www.thebiccountant.com/2017/08/27/how-to-create-and-use-r-function-library-in-power-bi/). There I...
View ArticleImport data from multiple SharePoint lists at once in Power BI and Power Query
This is a quick walkthrough on how you can easily import multiple SharePoint lists at once, just like the import from folder method. Start as usual You start your import like this: Pass the URL to the...
View ArticleEasy POST requests with Power BI and Power Query using Json.FromValue
The function Json.FromValue provides a super-easy way to create POST-calls to web services that require JSON format in their body parameters. Background If you want to make a POST request to a web...
View ArticleAutomatically expand all fields from a JSON document in Power BI and Power Query
If you work with JSON documents that are new to you, it can be very helpful to fully expand JSON to see at a glance what’s in there. The following function has you covered for this task. It returns a...
View ArticleEfficiently rename columns with a function in Power BI and Power Query
Edit 2018-July-05: As it turns out I’ve missed the native function that exists with exact the same functionality: Table.TransformColumnNames Thanks to Tristan Malherbe for pointing this out 🙂 But...
View ArticleFast and easy way to reference previous or next rows in Power Query or Power BI
When you search the web for solutions to reference previous or next rows in the query editor of Power BI or Power Query, you will find many solutions that base on an added index-column. But the problem...
View ArticleImprove import of Excel sheets with empty rows and columns in Power Query and...
When you import Excel sheets who have empty leading or trailing columns and rows (showing null-values), you can substantially improve the complexity and speed of your import process with a simple...
View ArticleHow to do a real VLOOKUP (false) in Power Query or Power BI
When you merge tables with distinct keys in Power Query you will get the same result than the VLOOKUP-function in Excel returns (if this is new to you, check out this article for example:...
View ArticlePerformance tip for List.Generate (1): Buffer your tables in Power BI and...
Lately I was working on a fairly advanced allocation algorithm on large data which forced me to search for different tricks to improve performance than those that you can find on my site here already....
View ArticleComparing Table.AlternateRows with List.Alternate in Power BI and Power Query
I must admit that I had more than one unsuccessful attempt to try to fully understand how the List.Alternate-function works. What helped me at the end, was the function Table.AlternateRows. It pretends...
View ArticleUnravel cumulative totals to their initial elements in Power BI and Power Query
Recently I came across an interesting request where someone wanted to un-cumulate their quarterly YTD-figures (green) into their single quarters values (red) like so (“Unravel cumulative totals”): Task...
View ArticleMemory efficient clustered running total in Power BI
Today I want to share a scenario where a running total calculation in the query editor saved a model that run out of memory when done with DAX: Problem The model couldn’t be refreshed and returned out...
View ArticleTransform text with exceptions in Power BI and Power Query
Recently I picked up an interesting request to transform text with exceptions: Transform the words in a column to proper case, but keep certain keywords like in a defined list. Problem: Transform text...
View ArticleReturn all occurrences of text between delimiters in Power BI and Power Query
The M-function Text.BetweenDelimiters does what it says and returns the text between 2 delimiters in the query editor of Power BI and Power Query. But irrespective of its optional arguments you can use...
View ArticleCreate list of accounts from NAV account schedules or COA totaling syntax
In this blogpost I’ll show you how to create a list of account numbers from the totalling syntax that you find in Dynamics NAV account schedules or chart of accounts for example:...
View ArticleImproved Text.SplitAny – function for Power BI and Power Query
Today I’ll present an adjustment to the Text.SplitAny – function in Power BI’s query editor or Power Query. The native function takes a string as an input and splits the text by every character that is...
View ArticleExport data from Power BI to csv using Python
In this blogpost I show you my M-Python-function that I use to export data from Power BI to csv files (Export Python). Why Python? I prefer it to R mostly because I don’t have to create the...
View Article