Post by account_disabled on Dec 7, 2023 21:34:29 GMT 12
The post aims to present the basic assumptions of the M language help understand what is happening in the program's formula bar present basic commands and commands and an example of a script that performs a specific task. It will be divided into two parts Introduction assumptions and concepts of language What it looks like in practice an example. Power Query Excel At this point a new source for PQ will be created automatically and its editing window will appear. However in the Home tab all available transformations and commands will be unavailable because our source does not actually have any definition and does not point to any data data place.
Transformations are unavailable because there is no data on which these transformations can be used. To go to the proper script editor select the View tab and then Advanced Editor. Now the editor with the script skeleton will appear on the screen. In fact this skeleton represents the bare Email Marketing List minimum that every script must have if you remove any element from this skeleton the script will be invalid and a warning will appear. At this stage it is worth noting that Power Query is case sensitive and for example replacing the keyword let with Let in the script will make it no longer valid. This applies to both commands and variable names.
Functions are created using the > operator and by preceding it in brackets the names of the function's input parameters are defined. Power Query itself analyzes and handles the type of data that the function will return you can still cast it to a specific type. As you can see the above function takes one parameter i.e. a variable named x and the content of the function indicates that it is responsible for doubling the value of the parameter passed to it. Of course in PQ there are plenty of readymade predefined functions and transformations that can be used in the script.
Transformations are unavailable because there is no data on which these transformations can be used. To go to the proper script editor select the View tab and then Advanced Editor. Now the editor with the script skeleton will appear on the screen. In fact this skeleton represents the bare Email Marketing List minimum that every script must have if you remove any element from this skeleton the script will be invalid and a warning will appear. At this stage it is worth noting that Power Query is case sensitive and for example replacing the keyword let with Let in the script will make it no longer valid. This applies to both commands and variable names.
Functions are created using the > operator and by preceding it in brackets the names of the function's input parameters are defined. Power Query itself analyzes and handles the type of data that the function will return you can still cast it to a specific type. As you can see the above function takes one parameter i.e. a variable named x and the content of the function indicates that it is responsible for doubling the value of the parameter passed to it. Of course in PQ there are plenty of readymade predefined functions and transformations that can be used in the script.