cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChhunH
Level: Powered On

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
Community Support Team
Community Support Team

Re: PieChart and Lookup Columns from SharePoint

Hi @ChhunH ,

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 395 members 6,737 guests
Please welcome our newest community members: