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 / Counting distinct valu...
Power Apps
Answered

Counting distinct values in Sharepoint list with dropdown value in the counting field

(0) ShareShare
ReportReport
Posted on by 30

I have two sharepoint lists that are updated by an app.

 

The first sharepoint list called installer is a list of people and contact information for various companies we do business with.

 

Kstuck_1-1628594100915.png

 

The second list is called tracking. It is used to track progress dates for various installations we have going on at many different locations with different installers.

 

Here is a snippet from the tracking list. There is more but it's mostly date fields that get filled in as the project progresses and a few other text fields

Kstuck_3-1628596982293.png

 

As you can probably guess the installer information is a dropdown in the app that updates the installer information in the Tracking list.

 

The installer list has around 25 different entries with 14 different companies. There are multiple installer contacts for some companies.

 

There may be companies that move off the tracking list for a few months then come back on the tracking list with a new project.

 

The company information is still in the installer list even if there are no active projects with that particular contact in the tracking list.

 

What I am trying to do in my app is get a count of jobs from the tracking list for each installer company and put that into a data table I can display in the app rather than exporting the tracking table to excel and filtering manually on different installercontact:company.

 

I'm looking for something like this:

Company A  12

Company B   2

Company X   5

Company J   14

 

On the surface it seems like it should be easy but I have been trying different things for a few days and have not been able to come up with a way to do it.

 

Any thoughts, suggestions, comments are welcome.

 

Thanks!

 

 

Categories:
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Try this, it should return a table with the columns and counts you are after:

     

    ForAll(
     Distinct(installer, company).Result,
     {
     CompanyName: Result,
     JobCount: CountRows(
     Filter(tracking, Result in installercontact.company)
     )
     }
    )

     

  • Kstuck Profile Picture
    30 on at

    Thank you very much for the help!

     

    It is very much appreciated!

     

    I gave it a try and it didn't work and it looks to be something with the very last installercontact.company.....Name isn't valid. This identifier isn't recognized.

     

    At any rate you gave me some insight into how the code should be written.

     

    I will hopefully get a chance to work on it a little more tomorrow or maybe later tonight.

     

    I can't thank you enough for the help and for sharing your knowledge and expertise.

  • Kstuck Profile Picture
    30 on at

    Got it!

     

    Darn typo's!

     

    Thank you again for your help and for sharing your knowledge and expertise!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard