Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Is there any PQ built in functionality that adds an item to the end of the list?
To elaborate, my initial list is following = {{1,2,3},{"A","B","C"}}
I want to add {1} at the end of the above list, I can currently do that by
let
Source = {{1,2,3},{"A","B","C"}},
Custom1 = List.InsertRange(Source,List.Count(Source),{1})
in
Custom1
But, I want to avoid writing Custom1 if there is a built-in functionality, something like following
let
Source = {{1,2,3},{"A","B","C"}},
Custom1 = List.addAtTheEnd(Source,{1})
in
Custom1
where the function figures out where to add the item by iteslf on the funtion call itself rather then me pointing it at the index position in
List.InsertRange(<list>, <index>, <values>)
Solved! Go to Solution.
Hi @smpa01
I don't see a built-in one, but you can write one custom function like this
let
Source = {{1,2,3},{"A","B","C"}},
fxListaddAtTheEnd = (SourceList,newValue)=>List.InsertRange(SourceList,List.Count(SourceList),newValue),
Custom1 = fxListaddAtTheEnd(Source,{1})
in
Custom1
Hi @smpa01
I don't see a built-in one, but you can write one custom function like this
let
Source = {{1,2,3},{"A","B","C"}},
fxListaddAtTheEnd = (SourceList,newValue)=>List.InsertRange(SourceList,List.Count(SourceList),newValue),
Custom1 = fxListaddAtTheEnd(Source,{1})
in
Custom1
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
11 | |
9 | |
6 | |
6 |