cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Count SharePoint list item in groupby function

Hi guys

 

i read a lot of topics but i didn't find the exact behaviour i'm looking for.

 

I developed something like this app 

 

Everythings works fine : the only part that i'm not be able to 'reproduce' is the sum of the department item in the first page. (see screenshot)

 

in my formula i have 

GroupBy('Department',"DepartmentName","Name")

 

where Should i add count command?? 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

You are getting an error because you are inserting that statement into the gallery’s Items Property.

Instead, you need to insert a label into the gallery and then put my formula into the Text function of the label.

Let me know if it works. Please take another screenshot if it doesn’t. Those previous screens were great!

View solution in original post

10 REPLIES 10
Super User III
Super User III

@costantini307 

I would recommend the formula below.  It does not use a GroupBy function. That's because we need to count the individual rows prior to grouping.

 

CountIf(ShowColumns('Departments',"DepartmentName"),DepartmentName="Finance")

---

Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly.  If your thought the post was helpful please give it a "Thumbs Up."

First of all thanks.

 

I tried to apply your advice but it seems not solved.

 

Keep in mind that my SharePoint list is called Projects Portfolio . Column where i have to grop by is called "Client" . 

Now: my actual formula is :

GroupBy('Projects Portfolio',"Client","Name")

 

and works . In the homepage i see every items grouped by Client .

Now what it should be your formula? This one?

CountIf(ShowColumns('Projects Portfolio',"Client")

 i tried but i got error message ;(

@costantini307 

What error message did you get?  Can you please take a screenshot?

 

My formula was generic.  Here's what I would do assuming you are displaying info in a gallery.  Try putting this inside a label.  If it doesn't work send that screenshot with the error and we'll troubleshoot.

 

CountIf(ShowColumns('Projects Portfolio',"Client"),ThisItem.Client=Client)

 

 

In attachment what i got.

 

let me know if you need furthers informations

You are getting an error because you are inserting that statement into the gallery’s Items Property.

Instead, you need to insert a label into the gallery and then put my formula into the Text function of the label.

Let me know if it works. Please take another screenshot if it doesn’t. Those previous screens were great!

View solution in original post

Very good. You are n.1

 

thank you very much. Just one more help. If i set the label with the value and then i pick-up an icon (circle) , the icon goes in front-end . 

Do you know the setting in order to set the label in front end and the icon bottom?

 

Thanks a lot!

@costantini307
Could you show me a picture of what you are trying to do? I don’t understand what is meant by “front end” of “icon bottom”

no problem . i found by myself

 

it's enough set fill parameter to 0 final

 

RGBA(255, 255, 255, 0)

 

Thank you again ! 

I’m glad you figured it out. Good luck building the rest of your app.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,082)