cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Chart with Sharepoint list information

Hi to All

 

I was checking that for this momment it isn´t possible to work together with Power BI, so I think that I good idea is create some chart using information from list, can someone how to create a chart with sharepoint list information ?

 

For example, in my list a have toys, so, I would like to have the total of Cars, Balls and Dolls, I think I can get the total using something like this for Balls and the same way to the rest...

CountRows(Filter(ListToys,toy= "Balls"))

but know How can I create the chart with that information?

 

regards,

 

Regard,

5 REPLIES 5
Highlighted
Power Participant
Power Participant

Re: Chart with Sharepoint list information

You can set the Items property of your chart to this:

 

AddColumns(GroupBy(ListToys, "toy", "AllItems"), "Amount",CountRows(AllItems))

 

Please let me know if this works.

 

 

It uses the GroupBy function:

https://powerapps.microsoft.com/en-us/tutorials/function-groupby/

Highlighted
Advocate II
Advocate II

Re: Chart with Sharepoint list information

Hi Steelman70

 

Thank you for your answer, to be honest with you it looks great

 

I did this, I don´t know if it is the best way to do it but I could create some charts 

  • I created a Collection named MyToys
  • I created a row name Ball and setup the quantity by a filter from the list, and the same way I created two more rows named, Cars and Dolls
  • In the Item property of the chart I assing the collection name and it worked fine

 

As I told you, I don´t know if it is the best way to do it but It worked great

 

Please let me know any comments

 

Regards.

Highlighted
Power Participant
Power Participant

Re: Chart with Sharepoint list information

Understood, your method of creating a collection should also work (and it does) but it seems un-necessary to create a collection.

Did you try simply placing the formula I suggested as the Items property of the chart?  If so, did you get a result?

Highlighted
Advocate II
Advocate II

Re: Chart with Sharepoint list information

Hi Steelman70

 

To be honest with you, I didn´t use your formula, but I have a question about that, where get that formula the Labels and values from each item( car, ball, doll) ?

 

Regards,

Highlighted
Power Participant
Power Participant

Re: Chart with Sharepoint list information

It is the way the GroupBy function works in the middle of the formula:

 

AddColumns(GroupBy(ListToys, "toy", "AllItems"), "Amount",CountRows(AllItems))

 

GroupBy of "toy" means group by the different labels you have in the toy column, hence Ball, Car etc. so you don't have to change anything if you add another type of toy like Truck. 

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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