Table.AddRankColumn

Adds a new column called newColumnName to the table based on the comparisonCriteria provided for ranking one or more existing columns. Advanced users can utilize the RankKind option in options for sel...

Syntax

Table.AddRankColumn(table as table, newColumnName as text, comparisonCriteria as any, optional options as nullable record) as table

About

Adds a new column called newColumnName to the table based on the comparisonCriteria provided for ranking one or more existing columns. Advanced users can utilize the RankKind option in options for selecting a more detailed ranking method.

Explanation

Integrate a new column titled RevenueRank into the table to rank the Revenue column in descending order from highest to lowest. Utilize the Power Query MTable functionality by adding the RankColumn method to the table, specifying the column name, sorting criteria, and competition ranking method. The resulting table will display the CustomerID, Name, Revenue, and RevenueRank columns, showing the ranked order of the revenue values.