Generating Fixed-Width Text Files In Excel With Power Query
While it’s fairly common to need to load fixed-width files using Power Query or Power Query (and there’s a nice walkthrough of how to do this here), occasionally you might want to use Power Query and...
View ArticleTiming M Query Execution In Power Query And Power BI (Revisited)
Some time ago I wrote the following post on how to work out how long your M query takes to execute in Power Query: https://blog.crossjoin.co.uk/2014/11/17/timing-power-query-queries/ While it’s still...
View ArticleThe M Code Behind Power BI Parameters
For me the most exciting new feature in Power BI in a long while is the appearance of Query Parameters for data loading. We have been promised an official blog post explaining how they work (although...
View ArticleUnderstanding Let Expressions In M For Power BI And Power Query
When you start writing M code for loading data in Power Query or Power BI, one of the first things you’ll do is open up the Advanced Editor for a query you’ve already built using the UI. When you do...
View ArticleCreating Tables In Power BI/Power Query M Code Using #table()
After my post earlier this week on creating current day/week/month/year reports in Power BI a few people asked me for a more detailed explanation of the way I was creating tables without using a data...
View ArticleCreating Sequences Of Integers And Characters In Power BI/Power Query Lists
When you’re writing your own M code you often find yourself needing to create a list containing a sequence of numbers or characters. Luckily the M language allows you to do this very easily when you...
View ArticleThe Ellipsis/Not Implemented Error In M
Recently I was creating a parameter in Power BI Desktop and had it configured something like this: I didn’t bother to choose anything in the Default Value dropdown box, and when I looked at the code...
View ArticleValue.ResourceExpression() And Query Folding In Power BI
When the June update for Power BI Desktop was released, I was extremely excited to discover an undocumented new feature that allows you to see when query folding is taking place while loading data in...
View ArticleAnother Way To Check Query Folding In Power BI/Power Query M Code
Following on from my last post on checking whether query folding is taking place in a Power BI/Power Query query, I’ve just stumbled on another way of doing this – by looking at metadata. I blogged...
View ArticleHandling 404–Not Found Errors With Web.Contents() In Power Query And Power BI
One strange feature of the Web.Contents() function in Power Query and Power BI is that it doesn’t respond in a consistent way to the standard error handling techniques used in M. I don’t know if this...
View ArticleUsing The RelativePath And Query Options With Web.Contents() In Power Query...
The Web.Contents() function in M is the key to getting data from web pages and web services, and has a number of useful – but badly documented – options that make it easier to construct urls for your...
View ArticleGenerating JSON In Power BI And Power Query
Often, when calling web services from Power BI or Power Query, you’ll need to generate some JSON inside your query to send to these web services. The M language makes this relatively easy to do with...
View ArticlePushing Data From Excel To Power BI Using Streaming Datasets
One Power BI feature that almost passed me by (because it was released in August while I was on holiday) was the ability to create streaming datasets in the Power BI web app and push data to them via...
View ArticleCalling Microsoft Flow From Power Query And Power BI
Since last week’s blog post caused quite a lot of interest, here’s something similar: did you know you can trigger a Flow in Microsoft Flow and get a response from it back using Power Query/Power BI?...
View ArticleReferenced Queries And Caching In Power BI And Power Query
Last week, Maxim Zelensky (whose blog is well worth checking out) tweeted about a very interesting answer he had received to a question he posted on the Power Query MSDN forum, on the subject of...
View ArticleSharing Power Query Queries With Azure Data Catalog
About a week ago, without any warning, a much-awaited new feature lit up in Azure Data Catalog: the ability to share Power Query queries between workbooks and users. In fact it’s not really a new...
View ArticlePower Query, Power BI And The “Allow Data Preview To Download In The...
Recently I was asked by a customer to do some tuning on an Excel workbook with a lot of Power Query queries in it. Although all of the data used in the queries was coming from tables in the workbook...
View ArticlePassing Parameters To SQL Queries With Value.NativeQuery() In Power Query And...
I first came across the Value.NativeQuery() M function about six months ago, but it didn’t do anything useful then so I didn’t blog about it. I checked it again recently though and now it does...
View ArticleFirst Thoughts On The Integration Of Power Query/M Into Analysis Services...
Last Friday’s big news was the release of the first CTP for Analysis Services v.next. Among several major new pieces of functionality (Ragged hierarchies! Drillthrough that works properly, even for...
View ArticleWeb.Contents(), Caching And The ExcludedFromCacheKey Option In Power BI And...
When you’re using the Web.Contents() M function to call a web service from Power Query or Power BI, you don’t necessarily get one HTTP request each time you call the function: some caching takes place,...
View Article