Hi,
I want to add sequence number column in collection. I am using Sequence function but it is creating all sequence number in each row.
I want out put like below.
Collection :-
Brand name, Brand description, Brand value
Br1, Description, 1200
I need extra column
Sequence number , Brand name, Brand description, Brand value
1, Br1, Description, 1200
2, Br2, Description, 1400
3, Br3, Description, 1500
Please suggest.
Regards,
Lalit Kadam
Hi @Lalit_Kadam
Let's say your original data is a collection named OriginalCollection. Try this:
//Clear the collection first
Clear(CollectionWithSequenceNumbers);
//For each item in the original collection, add a sequence number
ForAll(OriginalCollection,
Collect(CollectionWithSequenceNumbers,
Last(FirstN(AddColumns(OriginalCollection,"Sequence Number",CountRows(CollectionWithSequenceNumbers)+1),CountRows(CollectionWithSequenceNumbers)+1)))
);
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
193 | |
45 | |
45 | |
39 | |
35 |
User | Count |
---|---|
267 | |
83 | |
81 | |
71 | |
70 |