Hello all! I have questions on making a piechart based on SharePoint List records. I currently have a lookup column in Sharepoint where users can pick multiple values. I am trying to group the selections based on the selection to display it on a pie chart.
ClearCollect(Collection2, AddColumns(GroupBy(AddColumns(Collection1, "CategoryName", First(Tags).Value), "CategoryName", "CategoryList"), "CounofCategory", CountRows(CategoryList)))
I know that the code above is only getting the first value of the record selection, but I do not know a way to get all of the records from the multiple selection and group those values accordingly.
Hi @Anonymous ,
I'm afraid it's not supported to use multiple lookup column in groupby function.
Using AddColumns inside groupby function will only work to radio value, not multiple lookup values.
I think the issue's key is how to expend form based on multiple lookup column.
For now, there's no function about expending form.
I suggest you express your views on PowerApps Ideas Forum. Your precious advice will be very helpful for our work.
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
As an alternative way, you could try to use filter function.
Try this formula:
CountRows(Filter(Collection1,"value1" in Tags.Value))
CountRows(Filter(Collection1,"value2" in Tags.Value)) .....
Best regards,
Community Support Team _ Phoebe Liu
User | Count |
---|---|
256 | |
110 | |
90 | |
51 | |
44 |