cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vsslasd
Advocate V
Advocate V

How to Union two or more Group By Collections

I have about seven collections which I'd like to roll up to get a status count.

 

This works great:

AddColumns(GroupBy(Collection1, "ActiveStatus", "ByActiveStatus"),"Reference","Collection1","StatusCount",Sum(ByActiveStatus,Value(1)))

 

But i would like to do a union of that collection plus the other seven collections without having to patch to another collection, and display the results in a gallery.

 

AddColumns(GroupBy(Collection2, "ActiveStatus", "ByActiveStatus"),"Reference","Collection2","StatusCount",Sum(ByActiveStatus,Value(1)))

AddColumns(GroupBy(Collection3, "ActiveStatus", "ByActiveStatus"),"Reference","Collection3","StatusCount",Sum(ByActiveStatus,Value(1)))

In SQL it would be something like

Select A, Count(*)

Union

Select B, Count(*),

Union

Select C, Count(*)

0 REPLIES 0

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (81,052)