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

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.

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.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,089)