Confusion - PowerQuery M Syntax for "in", and terminology

ITookUrJob

New Member
Joined
Oct 13, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am trying to understand syntax and terminology of M-language as I am new to its syntax.

Power Query:
let
    Source = #table(
    type table [OrderID = number, CustomerID = number, Item = text, Price = number],  
        {  
              {1, 1, "Fishing rod", 100.00},  
              {2, 1, "1 lb. worms", 5.00}  
         }
    )
in
    Source{1}

I am trying to understand couple of things of PowerQuery m language syntax:

• Does let statement decide the order displayed in "Applied steps" pane?

• What is the point of "in" statement if the last step is the final transformation to be evaluated anyway?

• Should I call each step in the "let" statement a function, or a variable (I am confused on terminology here). I understand Source is a variable, but its a function as well, correct if I am wrong on this.
Reply
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
1. Everything starts with a Let, but not everything that appears after that and before the 'in' will necessarily be displayed as a step.
2. Everything ends with an 'in' which determines what the final output actually is (it doesn't actually have to be the last step in the Let sequence)
3. The part of each line before the = you can regard as a variable, the bit after it is the actual functional code (which can involve one or more functions)
 
Upvote 0

Forum statistics

Threads
1,223,697
Messages
6,173,895
Members
452,536
Latest member
Chiz511

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top