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
I want to add 4 to the list {5,6} and keep the others elements (lists) of the (outer) list
Source = {{1,2,3}, {5,6}, {12,13}}
//JW
Solved! Go to Solution.
Place the following M code in a blank query to see the steps.
let
Source = {{1,2,3}, {5,6}, {12,13}},
res_ = List.Transform(Source, each if _ = {5,6} then _ & {4} else _)
in
res_
| Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Place the following M code in a blank query to see the steps.
let
Source = {{1,2,3}, {5,6}, {12,13}},
res_ = List.Transform(Source, each if _ = {5,6} then _ & {4} else _)
in
res_
| Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
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.