cancel
Showing results for
Did you mean:

## Join of two Collections with sum up by Id

How would you try to get "D"?

Is there a easy solution by powerapps?

In my case, of course I have not only 2 columns, there are a few more and some differ from shop1 to shop2 , but I want them as "Details" in the main result table as well (special columns of shop 1 are empty for shop 2)...

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

Hi @PowerDapp2 :

I strongly agree with @gabibalaban .My code is a little bit different from his, used to solve the "=0" problem.

Add a button and set it's OnSelect property to:

``````ClearCollect(
IceCreamAll;
IceCream1;
IceCream2
);
ClearCollect(
collectionD;
ShowColumns(
GroupBy(
IceCreamAll;
"Flavor";
"Group"
);
"Quantity";
Sum(
Group;
Quantity
);
"Min";
If(
CountRows(Group) = 1;
0;
Min(
Group;
Quantity
)
);
"Max";
Max(
Group;
Quantity
)
);
"Flavor";
"Quantity";
"Min";
"Max"
)
)``````

Best Regards,

Bof

3 REPLIES 3
Multi Super User

I think you can use this formula:

It not solve the problem with min=0 when you have only one flavor record (like choco and pistachio) but you can work on it.

Community Support

Hi @PowerDapp2 :

I strongly agree with @gabibalaban .My code is a little bit different from his, used to solve the "=0" problem.

Add a button and set it's OnSelect property to:

``````ClearCollect(
IceCreamAll;
IceCream1;
IceCream2
);
ClearCollect(
collectionD;
ShowColumns(
GroupBy(
IceCreamAll;
"Flavor";
"Group"
);
"Quantity";
Sum(
Group;
Quantity
);
"Min";
If(
CountRows(Group) = 1;
0;
Min(
Group;
Quantity
)
);
"Max";
Max(
Group;
Quantity
)
);
"Flavor";
"Quantity";
"Min";
"Max"
)
)``````

Best Regards,

Bof

thank you very much for your help!

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA