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

Count occurrence of items in a SharePoint list

I have a SharePoint list with more than 1500 rows and I would like to count the occurrence of the same item. May I know how to do it? 

 

There are some additional requirements for this case,

I would like to count the number of events responsible for each person, however, when event no. is started with BA, we look at the "Person A" column, when event no. started with OL, we look at "Person B".

 

This means for the following table:

Event No.Person APerson B
BA202AlexBoris
BA203BorisCatherine
OL503CatherineAlex

 

The result will be

Alex: 2

Boris: 1

Catherine: 0

 

I have considered using Get Items, but because I have too many rows and distinct values (Person name), I would like to avoid using that.

 

Anyone with a solution will be really appreciated!! Thank you everyone!!

 

@v-litu-msft

@Paulie78 

2 REPLIES 2
AbdulWahab
Helper V
Helper V

Hi englcc,

 

The easiest way to fulfil your requirement.

  1. Approach #1
    1. Use something similar to the list row component. Add something similar to Fetch XML to retrieve distinct records. (Appy to distinct to that column on the basis you can detect duplication)
    2. List row again and add a filter of items. This list row gives you the count
    3. Use it in your logic to process further.
  2. Approach # 2:
    1. In first use components similar to list row
    2. Use something similar to Fetch XML
    3. Use group by in your fetch XML.

Let me know if I can provide you with more details.

 

Thanks
Regards,

Abdul Wahab
Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a

Hi AbdulWahab,

Thank you for your reply! Could you provide me with more detail on approach 2? I am exploring the possibility of using XML as well, but I couldn't use list row because I do not have a premium account.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,522)