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

Chart from sharepoint list

Hello,

 

I want to create a circular chart from a sharepoint list. I have a task list, in this list there a different colums, but I only need 3 for my chart:

 

AssignedTo (Person/Group Column)

Title (one line text)

time (number column)

 

I want to create a separate chart for each person. In this chart there should be all Items for the person with Title and time. Could you please help me?

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Re: Chart from sharepoint list

HI @chhe :

Q1:

I think this link will help you a lot.

https://powerusers.microsoft.com/t5/Building-Power-Apps/Pie-Chart-percentages/m-p/26305

1.PNG

Q2:

Can you tell me:

Do you mean you get a lot of pie charts after using that code?

Did you put this code in the items attribute of the gallery?

If this is the case, I think you should add a separate pie chart first ,then add the code in it,s items property.

 

Best Regards,

Bof

View solution in original post

9 REPLIES 9
Microsoft
Microsoft

Re: Chart from sharepoint list

Hi @chhe :

Could you tell me:

Do you want to get a dashboard like this?

 

1.PNG

Does your AssignedTo field allow multiple selections?

Ive made a test for your reference:

I assume the AssignedTofield does not allow multiple selections.

Here is my data source :list4

 

2.PNG

Step1:add a gallery and set its items property to :

GroupBy(ForAll(list4,{AssignedTo:AssignedTo.DisplayName,Title:'Title',time:time}),"AssignedTo","Image") /*image is a new column name created by groupby function*/

3.png

Step2:add a pie chart control into this gallery and set its text property to:

ThisItem.AssignedTo

 

4.png

Set its Items property to :

ThisItem.Image

 

5.png

Set its Items property to (This formula should be filled automatically):

ThisItem.Image.Title

 

6.png

Then you will get the result.

 

Best Regards,

Bof

 

chhe Helper III
Helper III

Re: Chart from sharepoint list

Yes, this dashboard looks good.

 

I don't know where I can change the gallery item property. I have filled it in in the "Items = fx" field.

 

property.jpg

 

 

Is that correct? At my gallery there appears a little red "X"? My list name is "Testkachel".

 

 

 

Microsoft
Microsoft

Re: Chart from sharepoint list

Hi @chhe :

 

Firstly,You can change the gallery's item property by following the steps I marked.

 

Capture.PNG

Secondly,could you show me more detials about the warning?Screenshots are better.

In addtion ,using app checker is a good way to looking for problems.

 

Capture1.PNG

Best Regards,

Bof

chhe Helper III
Helper III

Re: Chart from sharepoint list

Okay, then I have filled the code correctly.

I have 5 errors (two different types).

 

01.jpg

 

First error:

unexpected character

02.jpg

 

Second error:

invalid number of arguments

03.jpg

 

Microsoft
Microsoft

Re: Chart from sharepoint list

Hi @chhe :

Sorry I can't recognize your screenshot well due to language.

I have two suggestions:

  • Did you quote the field names in the formula correctly?
  • In some region, ; represent ,;;, represent ;,maybe you can try:

 

GroupBy(ForAll(list4;{AssignedTo:AssignedTo.DisplayName;Title:'Title';time:time});"AssignedTo";"Image") 

 

Best Regards,

Bof

chhe Helper III
Helper III

Re: Chart from sharepoint list

Okay, I restarted the app editor and now it works.

 

Is it possible to show the time value in the charts? And to create separate charts for each assignedTo Person?

Microsoft
Microsoft

Re: Chart from sharepoint list

Hi @chhe :

Q1:Is it possible to show the time value in the charts?Yes!

1.PNG

Q2:create separate charts for each assignedTo Person.

try this code

Filter(ForAll(list4,{AssignedTo:AssignedTo.DisplayName,Title:'Title',time:time}),AssignedTo="username")

2.PNG

I think this link will help you a lot:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-pie-chart

 

Best regards,

bof

chhe Helper III
Helper III

Re: Chart from sharepoint list

Q1:

 

I mean the title value and time value both. So that I can see which task has taken how much time.

 

Q2:

 

For the separat charts I used these expression:

 

 

Filter(ForAll(Testkachel;{AssignedTo:AssignedTo.DisplayName;Title:Title;Planzeit:Planzeit});AssignedTo="NAME")

 

 

But then I get as many equal charts as persons I have under "assignedTo". I only want to have one chart for this person.

 

I have already read the help under you link, but that didn't help so much. Is there another manual for charts in powerApps? 

Microsoft
Microsoft

Re: Chart from sharepoint list

HI @chhe :

Q1:

I think this link will help you a lot.

https://powerusers.microsoft.com/t5/Building-Power-Apps/Pie-Chart-percentages/m-p/26305

1.PNG

Q2:

Can you tell me:

Do you mean you get a lot of pie charts after using that code?

Did you put this code in the items attribute of the gallery?

If this is the case, I think you should add a separate pie chart first ,then add the code in it,s items property.

 

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

Top Solution Authors
Top Kudoed Authors
Users online (5,095)