none
Power Query Modularization and more RRS feed

  • Question

  • Hi,

    I've got a few smallish questions:

    1. What is the preferred way of modularizing your queries in Power Query? I'm currently working on building an excel table that contains 40-50 columns, creating one big query is unbearable. Right now I'm creating on query per logical grouping of columns which returns a function that accepts one or more parameters (e.g. "let x = (products) => dosomething in (products) => x(products)"). Is there a better way? With sections perhaps?
    2. Is there a way to share M language/Power Query code across Excel files?
    3. What does the "#" symbol mean in code such as #table() or #duration(...)? I couldn't find any explanation on the MSDN page or the M language reference. It looks like it's some sort of "constructor function" marker, but is there an official description of it somewhere?

    Thanks.

    Thursday, December 17, 2015 8:42 PM

Answers

All replies

  • 1. I am generally following Ken Puls recommendations 

    2. Not in a practical way, unless you use the PowerBI cloud service. The only 'on premise' alternative is described in this post by Chris Webb

    3. See the M Formula Language Specification

    Tuesday, December 22, 2015 3:45 PM
  • 1. Thank you for the link. It looks like we're doing things very similarly to the way he's proposing. The only difference seems to be that we're loading all tables into memory and then share those with all "Subqueries".

    2. Thank you for the info. We'll probably just stay with duplicating code then since it's only used at two places.

    3. Thank you for the link. Looks like #table, #date and so on are keywords as listed under section 2.6.4 on page 24.

    Thursday, December 31, 2015 10:16 AM