Table.FuzzyGroup
This function groups the rows of a table by matching values in the specified column, known as the key, for each row with a fuzzy logic approach. For each group, a record is created with the key column...
Table.FuzzyGroup(table as table, key as any, aggregatedColumns as list, optional options as nullable record) as table
This function groups the rows of a table by matching values in the specified column, known as the key, for each row with a fuzzy logic approach. For each group, a record is created with the key columns and their values, as well as any aggregated columns specified in the aggregatedColumns parameter. The order of rows returned by this function may vary and is not guaranteed.
You can include optional options to customize how the key columns are compared:
- Culture: Allows grouping records based on specific cultural rules specified by a valid culture name. For example, setting the Culture option to "ja-JP" will group records based on Japanese culture. The default value is "", grouping based on Invariant English culture.
- IgnoreCase: A true/false value enabling case-insensitive key grouping. For example, when set to true, "Grapes" will be grouped with "grapes". The default value is true.
- IgnoreSpace: A true/false value allowing the combination of text parts to find groups. For example, when set to true, "Gra
Group the table by location and add a new column called [Count] that shows the number of employees in each location. This can be achieved using the Power Query function MTable.FuzzyGroup. This function takes a table of employee records with columns for EmployeeID and Location. The FuzzyGroup function groups the records based on similar locations, considering case and spacing differences. The output is a new table with the count of employees in each location, ignoring case and spacing discrepancies. The final table will display the unique locations and their respective employee counts.