DSipcenko's avatar
DSipcenko
New Member
3 years ago
Status:
New

PowerQuery M-Code: special symbol for previous step name

UserStory: in 99% cases we use previous name as input for current step - very annoying and difficult to read, not comfortable to type and edit (it's always a double work).

Proposal: reserve some special symbol (#, for instance) for previous step name (like "_" for each)

This feature would be very useful for advanced users, who works more with Advanced Editor than with GUI.


Metacode Example:

Instead of this:

 let     Source = someLoadDataFunction(...),     #"Step 1"  = someFunction1 (Source, ....),     #"Nice Step 2"  = someAdvancedFunction2 (#"Step 1", ....),     #"Clever Step Name 3"  =  someVeryAdvancedFunction3 (#"Nice Step 2", ....),     #"beautiful Step 4"  = someSmartCode4 (#"Clever Step Name 3", ....),     Result     = someGeniousCode5 (#"beautiful Step 4", ....), in     Result 


 It would be nice to use this syntax:

 let     Source = someLoadDataFunction(...),     #"Step 1"  = someFunction1 (#, ....),     #"Nice Step 2"  = someAdvancedFunction2 (#, ....),     #"Clever Step Name 3"  =  someVeryAdvancedFunction3 (#, ....),     #"beautiful Step 4"  = someSmartCode4 (#, ....),     Result     = someGeniousCode5 (#, ....), in     Result 


Post with screens available here

3 Comments

  • Very necessary for the scenarios where we need to move steps around, and risk breaking references that are hard to debug in an already very-hard-to-debug language. Since order of operations is intrinsic to power query, relativising references would make it far easier to work with code rather than the restrictive GUI.


    Would be good to be able to traverse multiple steps backwards in cases where the step before is not the table you intend to operate on, but retrieves some value you need, e.g.:


    let

     Step1 = loadData(...),

     Step2 = ([params...]) => [function definition],

     Step3 = Table.AddColumn(# - 1, "NewColumn1", each Step2([params...]))

    in

     Step3

Recent ideas