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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Attempting to generate a list of values when the upper and lower limits are determined by the min and max values from any cell of multiple columns. Currently produces Error in 1 cell under "List".
let
Source = List.Generate(() => List.Min({Column[1],Column[2],Column[3]},0), each _ <= List.Max({Column[1],Column[2],Column[3]}), each _ + 1)
in
#"Source"
Solved! Go to Solution.
Hi @Nyx,
You are getting htis error because the code tries to find min/max between the lists (not the numbers), kind of List.Min({List1, List2, List3}). PQ just does not know how to compare them (and after all this is not what you want anyway). You can fix it by combining all the lists into a single one using List.Combine:
let
Column =
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTIGYjOlWJ1oJSMgywSIzcE8kLgpEFuAeSZgVTpKlkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"1" = _t, #"2" = _t, #"3" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"1", Int64.Type}, {"2", Int64.Type}, {"3", Int64.Type}})
in
#"Changed Type",
Source = List.Generate(() => List.Min(List.Combine({Column[1],Column[2],Column[3]}) & {0}), each _ <= List.Max(List.Combine({Column[1],Column[2],Column[3]})), each _ + 1)
in
#"Source"Cheers,
John
Hi @Nyx,
You are getting htis error because the code tries to find min/max between the lists (not the numbers), kind of List.Min({List1, List2, List3}). PQ just does not know how to compare them (and after all this is not what you want anyway). You can fix it by combining all the lists into a single one using List.Combine:
let
Column =
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTIGYjOlWJ1oJSMgywSIzcE8kLgpEFuAeSZgVTpKlkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"1" = _t, #"2" = _t, #"3" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"1", Int64.Type}, {"2", Int64.Type}, {"3", Int64.Type}})
in
#"Changed Type",
Source = List.Generate(() => List.Min(List.Combine({Column[1],Column[2],Column[3]}) & {0}), each _ <= List.Max(List.Combine({Column[1],Column[2],Column[3]})), each _ + 1)
in
#"Source"Cheers,
John
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 10 | |
| 6 | |
| 5 | |
| 4 | |
| 2 |