Table.Min

D

T

The M Code Behind the Power Query M function Table.Min

What is Power Query?

Power Query is a data transformation and cleansing tool that is a part of the Microsoft Power BI suite. It is used to extract, transform, and load data from various sources into a structured format that can be analyzed and visualized. The Power Query Editor provides a user-friendly interface that allows you to perform a wide range of data transformations using a simple drag-and-drop approach.

Understanding the Table.Min Function

The Table.Min function is a part of the M language that is used in Power Query. It is used to find the minimum value of a specific column in a table. The syntax for the Table.Min function is as follows:


Table.Min(table as table, column as text) as any


The first argument, table, is the table that you want to search for the minimum value. The second argument, column, is the name of the column that you want to search. The function returns the minimum value of the specified column.

How to Use the Table.Min Function

To use the Table.Min function, you need to follow these steps:

1. Open the Power Query Editor.

2. Click on the Home tab.

3. Click on the New Source option.

4. Select the type of data source that you want to use.

5. Connect to the data source and import the data into Power Query.

6. In the Power Query Editor, select the table that you want to search.

7. Click on the Add Column tab.

8. Click on the Custom Column option.

9. In the Custom Column dialog box, enter a name for the new column.

10. In the Custom Column dialog box, enter the following formula:


Table.Min(table, "column")


11. Click OK to create the new column.

12. The result of the Table.Min function will be displayed in the new column.

Applications of the Table.Min Function

The Table.Min function can be used in a variety of ways in Power Query. Some of its applications include:

1. Identifying the minimum value of a specific column in a table.

2. Analyzing trends in data by comparing the minimum value of a column over time.

3. Identifying outliers in data by comparing the minimum value of a column to the rest of the data.

4. Filtering data based on the minimum value of a column.

5. Creating new columns based on the minimum value of a column.

In conclusion, the Table.Min function is a powerful tool that can be used to analyze data in Power Query. By understanding the M code behind this function, you can take advantage of its various applications and make informed decisions based on your data. Whether you are a data analyst or a business owner, the Table.Min function can help you gain valuable insights into your data and drive your success forward.

Power Query and M Training Courses by G Com Solutions (0800 998 9248)

Upcoming Courses

Contact Us

    Subject

    Your Name (required)

    Company/Organisation

    Email (required)

    Telephone

    Training Course(s)

    Your Message

    Upload Example Document(s) (Zip multiple files)