
The Power Query M language allows you to create a list containing a sequence of numbers or characters very easily. This is possible when you are defining lists by using expressions in the format-
To get in-depth knowledge about Power Query and its functions, check our latest high rated Power Query Course and become a pro in Power Query & it’s functioning.
Create A Sequential List With Power Query
Let us take an example to understand this feature.
Step 1: Add Custom Column
You can write an M query in Power Query Editor for creating a list of integers, list of characters and list of Unicode values. After you load the data in Power Query, you can link it to the list or table created using M query. To write the M query you can use the Advanced Editor or Custom column as shown below.
Step 2: Write M Code
Write the M code we have created a simple table with three columns and three rows using the below-given formula-
#table({“A”..”C”}, {{1..3}, {7..9}, {11..13}})
The output of this formula is shown below.
You can learn more :
- Disable Relationship Detection for Beginners in Excel
- How to Navigate Query Editor in Excel
- Learn How to Split Queries In Power Query
- How to Edit A Query using Power Query
Conclusion
This is how you can control, shape and modify your data table using Power Query Editor features in Power BI.