cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GaryHounslow
Level: Powered On

Groupby, AddColumns anf Filter

Good afternoon,

I have a Gallery which displays entries from a Sharepoint list.

I would like this Gallery to only display items where the "Processed" column is set to "Yes" in Sharepoint (it is a yes/no column)

As well as the above I also want the filtered data to by grouped by another Column "Budget Holder", this is a Person field.

 

I have 2 formulas which can achieve both of the above but am struggling to get the syntax correct to implement them both at the same time.  The below is the 2 formulas I have:

 

GroupBy(AddColumns('Accounts Payable',"BHolder",'Budget Holder'.DisplayName),"BHolder","Grouped")

 

Filter('Accounts Payable',Approved = 1)

 

Can anybody help me make this in to one Formula as I am struggling at the moment.

 

Many thanks

Kind regards

Gary

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Groupby, AddColumns anf Filter

Hi @GaryHounslow ,

Please consider take a try with the following formula on your side (set the Items property of the Gallery to following😞

GroupBy(
AddColumns(
Filter('Accounts Payable', Approved = 1),
"BHolder",
'Budget Holder'.DisplayName
),
"BHolder",
"Grouped"
)

Then within your Main Gallery (Gallery1), add a nested Gallery (Gallery2), and then set the Items property to following:

ThisItem.Grouped

within your nested Gallery (Gallery2), you could add some Label controls to display other column values from your SP List using the following formula:

ThisItem.Column1
ThisItem.Column2

...

 

Within your Main Gallery (Gallery1), add a Label control, set the Text property to following:

ThisItem.BHolder

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Groupby, AddColumns anf Filter

Hi @GaryHounslow 

 

There are issues with the Yes/No type column

Check my video on Yes/No fields 

https://youtu.be/pn50AKn3Q1Y?t=460

 

Ideally, I would replace it with a choice column

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hooze
Level: Powered On

Re: Groupby, AddColumns anf Filter

Assuming you're pointing at the right data with the names you've used here, this should do the trick.

 

GroupBy(
AddColumns(
Filter('Accounts Payable', Approved = 1),
"BHolder",'Budget Holder'.DisplayName),
"BHolder","Grouped")

If it does not, we may need some more information about how all of this is structured.

Dual Super User
Dual Super User

Re: Groupby, AddColumns anf Filter

Hi @GaryHounslow 

 

Can you try to update your expression as:
 
GroupBy(AddColumns(Filter('Accounts Payable',Approved = 1),"BHolder",'Budget Holder'.DisplayName),"BHolder","Grouped")
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Community Support Team
Community Support Team

Re: Groupby, AddColumns anf Filter

Hi @GaryHounslow ,

Please consider take a try with the following formula on your side (set the Items property of the Gallery to following😞

GroupBy(
AddColumns(
Filter('Accounts Payable', Approved = 1),
"BHolder",
'Budget Holder'.DisplayName
),
"BHolder",
"Grouped"
)

Then within your Main Gallery (Gallery1), add a nested Gallery (Gallery2), and then set the Items property to following:

ThisItem.Grouped

within your nested Gallery (Gallery2), you could add some Label controls to display other column values from your SP List using the following formula:

ThisItem.Column1
ThisItem.Column2

...

 

Within your Main Gallery (Gallery1), add a Label control, set the Text property to following:

ThisItem.BHolder

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,220)