cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GaryHounslow
Helper III
Helper III

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
v-xida-msft
Community Support
Community Support

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
RezaDorrani
Dual Super User II
Dual Super User II

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
Helper I
Helper I

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.

yashag2255
Dual Super User II
Dual Super User II

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!
v-xida-msft
Community Support
Community Support

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

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,017)