Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello and thank you for reading.
I'm trying to filter a table in the advanced query editor based on the max value in a specific column.
Here's the M:
~~~~
= Table.SelectRows(#"Changed Type1", each [Week by Year] = List.Max(#"Changed Type1", [Week by Year]))
~~~~
#"Changed Type1" is the previous line of code
[Week by Year] is the column i'm trying to filter.
The error looks like this:
Expression.Error: We cannot convert a value of type Table to type list.
Details:
Value=Table
Type=Type
This was my first attempt:
~~~
= Table.SelectRows(#"Changed Type1", each [Week by Year] = Max([Week by Year]))
~~~
Thanks for your help!
Solved! Go to Solution.
Hi,
Just a slight change:
= Table.SelectRows(#"Changed Type1", each [Week by Year] = List.Max(#"Changed Type1"[Week by Year]))
List.Max requires a list (such as a Table[Column]) as its first argument.
Owen
Like this?:
= Table.SelectRows(#"Changed Type1", each [Week by Year] = Table[Week by Year].List.Max(#"Changed Type1", [Week by Year]))
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 91 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |