cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

CountRows where records are the same

Hi all

I was wondering if it is possible to count rows in a gallery where all records are the same with the exception of the SF_Serial_N_P column. So in the case of the picture of my Sharepoint attached, going from top record to bottom, it would be.1,2,1,2

Screenshot 2020-09-26 20.29.52.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: CountRows where records are the same

Hi @Corissandageri ,

I cannot read your image to get the column names, but I will give you the syntax

AddColumns(
   GroupBy(
      YourListName,
      "Column1Name",
      "Column2Name",
      "Column3Name",
      "OtherData"
   ),
   "ItemCount",
   CountRows(OtherData)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

8 REPLIES 8
Highlighted
Super User III
Super User III

Re: CountRows where records are the same

Hi @Corissandageri ,

I cannot read your image to get the column names, but I will give you the syntax

AddColumns(
   GroupBy(
      YourListName,
      "Column1Name",
      "Column2Name",
      "Column3Name",
      "OtherData"
   ),
   "ItemCount",
   CountRows(OtherData)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Helper IV
Helper IV

Re: CountRows where records are the same

Hi Warren

Your Syntax works, and thank you, but I having trouble with my columns. Some columns from my Sharepoint list are not available, even though as far as I can see, they have the same single line text properties as the others. Thinking there may be something wrong with my data I inserted a standard gallery, where all my data viewed normally. I was having the same trouble yesterday when I was groupby one column.

Highlighted
Super User III
Super User III

Re: CountRows where records are the same

Thanks @Corissandageri ,

If the data in SharePoint is all single lines of text and you are a grouping directly on the List, they all should be available. What are you not seeing?

Highlighted
Helper IV
Helper IV

Re: CountRows where records are the same

This Works

AddColumns(
    GroupBy(
        Sanford_Pallet_Serial_Number_Record,
        "SF_Serial_N_P",
        "SF_Serial_N_U",
        "Location",
        "Temp",
        "OtherData"
    ),
    "ItemCount",
    CountRows(OtherData)
)

But this doesn't

AddColumns(
    GroupBy(
        Sanford_Pallet_Serial_Number_Record,
        "SF_Serial_N_P",
        "SF_Serial_N_U","SFLot_Numbers",
        "Location",
        "Temp",
        "OtherData"
    ),
    "ItemCount",
    CountRows(OtherData)
)

To assure it was not a typo at my end I copy and pasted the column title, I am having the same problem with several other columns which are single line of text. I really can't see the difference in any of the properties between the different columns.

Highlighted
Super User III
Super User III

Re: CountRows where records are the same

Thanks @Corissandageri ,

So SFLot_Numbers is not appearing in your list. Have you renamed this column since you created it? Go to your SharePoint field definitions click on the column and look at the line of text at the bottom and you will see at the end the “original” field name. A good example is when you rename the Title field.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Helper IV
Helper IV

Re: CountRows where records are the same

Hi again Warren

Yes, I did rename the column, I can see the old name Pallet_Number. I see when I change the column name back to the original, that it works. !Yay!!. Does this mean I will have to revert to all the old column names? or make a brand new list. There is no way I would have worked this one out without assistance, thank you.

Highlighted
Super User III
Super User III

Re: CountRows where records are the same

Hi @Corissandageri ,

As far as the “old” column names, yes you will have to keep referring to them. You do not need a new list, but get into the habit of settling on a column name at the start (other than renaming Title for a key column if you need/want to) or you will experience a lot more confusion than you have to.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Helper IV
Helper IV

Re: CountRows where records are the same

Good to know, thanks again for your help Warren, much appreciated.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,953)