

GetRows returns all the rows that the query can return, that’s to say the table returned by the #”Changed Type” step.
#Power bi desktop may 2020 download code
It’s very easy to generate the required M code when you use the custom function that I blogged about here.

The six columns listed here are the six columns you can see in the screenshot of the query output above. GetType returns a table type that describes the columns and their data types present in the output of the query.There are three fields in the record in the second parameter of Table.View that you need to change: It uses Table.View to override query folding behaviour by intercepting what happens when the table returned by the query is filtered. The OverrideZeroRowFilter step is where the magic happens. #"Changed Type" = Table.TransformColumnTypes( #"Expanded Column1" = Table.ExpandRecordColumn(

Source = Json.Document(File.Contents("C:\generated.json")), You’ll end up with a query that looks something like this: let Say you have a large JSON file – for this test I generated one that is 67MB containing random data using this handy online tool – and you want to load it into Power BI. Now, thanks to a lot of help from Curt Hagenlocher of the Power Query development team I have all the details I need to blog about it. In fact, what I’m going to describe is more or less what I showed towards the end of my appearance on Guy In A Cube last year and in a few other posts, but at that time I didn’t understand properly why it worked or what the performance implications actually were. It involves some fairly complex M code but I promise you, the effort is worth it! In this post I’m going to show you a technique that can cut this wait by up to 50%. It can sometimes be frustrating to work with slow data sources or complex Power Query queries in Power BI Desktop: you open the Power Query Editor, make some changes, click Close & Apply and then wait a loooong time for your data to refresh.
