I have a Sharepoint list I want to do a formula with
The formula goes like this If(Source.Column1 have the same string or if there is only one of the same string, Add the numbers of Source.Column2 that are the same together)
I also want to Collect(Distinct(Source, Column1 with the results from the If statement).
Hope it makes sense.
Solved! Go to Solution.
I believe something like this will accomplish what you are trying to do.
ClearCollect(colResults, //* create a new collection called colResults
DropColumns(
AddColumns(
GroupBy(Source, "Column1", "by_Column1"), //* group by the unique values in Column1
"total_Column2",Sum(by_Column1, Column2)), //* total the records for those unique values
"by_Column1")) //* drop the extra columns you don't need
With the source data on the left, this statement produces the output on the right.
Hope this helps.
I believe something like this will accomplish what you are trying to do.
ClearCollect(colResults, //* create a new collection called colResults
DropColumns(
AddColumns(
GroupBy(Source, "Column1", "by_Column1"), //* group by the unique values in Column1
"total_Column2",Sum(by_Column1, Column2)), //* total the records for those unique values
"by_Column1")) //* drop the extra columns you don't need
With the source data on the left, this statement produces the output on the right.
Hope this helps.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
198 | |
178 | |
64 | |
34 | |
32 |
User | Count |
---|---|
340 | |
273 | |
116 | |
73 | |
57 |