I am having a choice field called Cateogry which is having values as "Sancks,Electronics, Books" etc. Now i want to group by these SharePoint list items with category and show on Pie chart as well as in Gallery. Earlier I have maitained in single line of text for cateogry field. Then i have used below formula. Since I have changed column data type from Single line of text to choice, this formula will not work. This is giving error at column name and saying, expected values are Text. how to deal with this? Is it an issue or limitation?
AddColumns(GroupBy('Purchase Orders',"Category", "Group"), "TotalQuantity", Coalesce(Sum(Group, Quantity),0))
Solved! Go to Solution.
Workaround:
Use AddColumns to introduce a new field based on the Complex field then group by the new field.
e.g. if my choice field is Category
Groupby(AddColumns(DataSourceName, "NewFieldName",Category.Value),"NewFieldName","GroupName")
Hi MihirY,
Thanks for feedback.
Per my test, I found that a Choice column type is not supported in the GroupBy function.
Please consider to submit a request at PowerApps ideas Forum:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
I will help and collect it on my side.
Best regards,
Mabel Mao
It is sad to know that Choice field is not supported for GroupBy function. Any workaround is there?
One workaround i think is:
We can create one more field in the same list with single line of text and update the value with workflow as choice field value. Now use that field in groupby function inside powerapp. But this is too indirective way. What you think?
I have submitted an idea in power apps form for Choice field not supported in groupby function.
Workaround:
Use AddColumns to introduce a new field based on the Complex field then group by the new field.
e.g. if my choice field is Category
Groupby(AddColumns(DataSourceName, "NewFieldName",Category.Value),"NewFieldName","GroupName")
So far so good.
And How about to take count RiskStatus
GroupBy(
AddColumns(
RiskAndIssueLog,
"NewFieldName",
RiskStatus.Value
),
"NewFieldName",
"RiskName"
)
@gokello Can anyone help with taking this a step further. I've got the grouped by on a choice field working, as well as a count of those items. But I also need to SUM a couple of fields in the list (fields called Copies (numeric) and Impressions (numeric) and Total Impressions (calculated copies x impressions).
This works great:
SortByColumns(
GroupBy(AddColumns(Request,"OrgCodeGroup",'Org Code'.Value),"OrgCodeGroup","GroupedByOrgCode"),
"OrgCodeGroup",Ascending)
Thanks, any help would be greatly appreciated.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
200 | |
98 | |
59 | |
58 | |
53 |
User | Count |
---|---|
257 | |
161 | |
88 | |
79 | |
69 |