Forum Discussion
Creating a Column/Measure for List Length
Appreciate this article is quite old but my search took me here.
ChatGPT gave me this very useful answer which worked:
To count the number of records in a column of "List" type in Power Query, you can use the "Add Custom Column" feature to apply the `List.Count` function to each row. Here's how you can do it:
1. **Open Power Query Editor**: Ensure you're in the Power Query Editor where your data is loaded.
2. **Select "Add Column"**: At the top of the Power Query Editor, click on the "Add Column" tab.
3. **Choose "Custom Column"**: Click on "Custom Column" to open the custom column formula editor.
4. **Use the List.Count Function**: In the formula field of the custom column editor, you will write a formula using the `List.Count` function. Assuming the name of your column with list type data is `MyListColumn`, the formula would look like this:
List.Count([MyListColumn])