cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

PieChart and Lookup Columns from SharePoint

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. 

 

 

1 REPLY 1
v-yutliu-msft
Community Support
Community Support

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

 

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (5,344)