cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dennis_Qiang
Helper III
Helper III

GroupBy formula using issues

I know GroupBy Syntax is  ''GroupBy( Table, ColumnName1 [, ColumnName2, ... ], GroupColumnName )''.

 

My question is if my column is Choice type, it can not be use. If single line Type, it works. ( Table datasource base on Sharepoint list )

 

So how to use GroupBy formula if my column is Choice Type ?

 

Thank You

Dennis

1 ACCEPTED SOLUTION

Accepted Solutions
ganeshsanap
Memorable Member
Memorable Member

@Dennis_Qiang As per this post, SharePoint Choice Field is not supported with GroupBy function.

But there is an workaround of using AddColumns function. You can use it like below:

 

Groupby(AddColumns(DataSourceName, "NewFieldName",Category.Value),"NewFieldName","GroupName")

 

Here, We are using AddColumns to introduce a new field based on the Choice field (Category) then grouping by the new field.

Reference: How to do a group by with Choice field 


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

View solution in original post

2 REPLIES 2
eka24
Super User
Super User

The only difference is adding .Value to the choice field.

 

Check this post

https://powerusers.microsoft.com/t5/Building-Power-Apps/Using-Choice-Column-in-PieCharts/m-p/352272#...

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

ganeshsanap
Memorable Member
Memorable Member

@Dennis_Qiang As per this post, SharePoint Choice Field is not supported with GroupBy function.

But there is an workaround of using AddColumns function. You can use it like below:

 

Groupby(AddColumns(DataSourceName, "NewFieldName",Category.Value),"NewFieldName","GroupName")

 

Here, We are using AddColumns to introduce a new field based on the Choice field (Category) then grouping by the new field.

Reference: How to do a group by with Choice field 


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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,500)