cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ananda
Resolver I
Resolver I

Group By on Person field not working as it works for choice columns.

Group By on Person field not working as it works for choice columns.

It’s working on Choice field using below formula AddColumns(GroupBy(AddColumns(colForChart,”name1″,Status.Value),”name1″,”TestName”),”Number”,CountRows(TestName)) Returns Count against each status

ananda_0-1637224014955.png

It’s not working on Person field
AddColumns(GroupBy(AddColumns(colForChart,”name2″,’Assigned To’.DisplayName),”name2″,”TestName2″),”Number”,CountRows(TestName2))

Expecting Result

User1 - 10

User2 - 10

User3 - 10

Appreciate any help on this. Thank you

 

5 REPLIES 5
CNT
Super User
Super User

@ananda I tried with the Person field and it works fine as seen below. Could be something wrong in your collection?

CNT_0-1637226865213.png

 

ClearCollect(colPersonCount, AddColumns (GroupBy (AddColumns (TicketsCol, "name2", 'Assigned To'.DisplayName), "name2", "TestName2"), "Number", Count Rows (Test Name 2)))

 

It's not working, My field is 'Assigned To'.

 

 

@ananda In my example the field Person is of Type Person or Group as seen below. What is the type of the 'Assigned To' Field?

CNT_0-1637241771560.png

 

Person or Group, Group By expects a text.. Not Person and Group.. Is there any work around..

ananda_0-1637243791002.png

Thanks

 

@ananda Can I see a screen shot of the full formula which has the error?

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,206)