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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,254)