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

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

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

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

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,013)