web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Countrow of distinct item
Power Apps
Answered

Countrow of distinct item

(0) ShareShare
ReportReport
Posted on by

Hello All,

 

How can i set up a count of employees that are distinct to the 'Job Title' and report to the reporting Manager? 

 

So i want a gallery with a list of distinct titles and the number of employees for that specific title. 

 

Example table below: 

Admin 1

Manager 2
Sales Rep 2

 

I currently have a variable set as mgrVar= Thisitem.Employee that needs to be incorporated into the formula. It is a onselect variable. Not sure if this matter, but not all reporting will have the same type of job title employee. Some managers will have Specialist, supervisor, etc. That is the why I want it dynamically show whomever is selected their respective employee title and employee count will appear.

 

EmployeeJob TitleReporting Manager

Pluto

AdminBugs

Mickey

ManagerBugs
MinnieManagerBugs
DonaldSales RepBugs
GoofySales RepBugs

 

Thank you

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    For your table above, as the Items property of a gallery:

    GroupBy(Table,"Job Title","DATA")

    Put two labels in the gallery, One with Text property ThisItem.'Job Title" and the other with CountRows(ThisItem.Data)

    Using your data:

    !!.jpg

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    You could even show them with names by putting a listbox in the gallery with the Items property ThisItem.DATA.

    !.jpg

     

  • punksterz626 Profile Picture
    on at

    its not accepting the groupby function.

     

    So on the blank gallery Item property i have the following syntax Groupby('Org Chart', "Job Title", "Data")

     

    Org Chart is the source (sharepoint List). Did i do something wrong here? 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626

    GroupBy not Groupby 

  • punksterz626 Profile Picture
    on at

    For some reason intellisense is not recognizing the 'Job Title' name

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626 

    Is anything else showing up that looks close?  Maybe you repurposed the Title column?

  • punksterz626 Profile Picture
    on at

    A datacard in the form. I found a workaround. It the form the Datafield listed it as "field_2" and it worked when i try using that. 

     

    Now, how do I combine these two syntax in the gallery? Right now its listing all the Job Title in the SP list and the total numbers. The filter is used when a certain employee is selected.

     

    Filter('Org Chart',Employee =Gallery3_1.Selected.Employee)

    GroupBy('Org Chart',"field_2", "Data")

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @punksterz626

    That sounds like a different question. 

  • punksterz626 Profile Picture
    on at

    it's not listing the manager's employee. it is listing the entire SP list and total. I need to incorporate this variable in the formula so that when an employee is selected only the result for the employee will populate

     

    mgrVar= Thisitem.Employee

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard