cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnjohn123
Super User
Super User

Show charts inside my sharePoint modern page using Power app

I want to build 3 charts and show them inside my SharePoint online modern page, the charts are as follow:-

 

charts2types.png

 

1) First chart is to group the items from a single SharePoint list by Created date, and show the total number of items based on the day of the week (Mon till Sun).

2) Second chart is to show the total number of items from 4 different lists and show the percentage inside a pie chart

3) Third chart is to group the items from a single SharePoint list by Created date, and show the total number of items based on the month (from the first month of the year till current month).

 

So how i can build such charts and show them inside modern SharePoint page?

Thanks

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @johnjohn123,

 

For the first chart you could use some addcolumns, weekday, countrows and group by functions.

 

Below is an example of that approach.

In this example I haven't included a filter. So, it would count all the the items from every saturday. You need to add that filter in your situation.

 

AddColumns(GroupBy(AddColumns(SingleList, "ShortDate",Switch(Weekday(Created),1,"SUN",2,"MON",3,"TUE",4,"WED",5,"THURS",6,"FRI",7,"SAT")),"ShortDate","Count"),"Number of Items", CountRows(Count))

 

firstchart_created.png

johnjohn123
Super User
Super User

@Expiscornovus  thanks for the helpful reply.. but what about the rest of the Reports? are those Power Apps reports or more into been Power BI reports?

Thanks

Expiscornovus
Super User
Super User

Hi @johnjohn123,

 

I was looking into that as well and I think the other ones should also be possible. But I simply didn't have the time yet to create and share an example with you for the other two reports 😁

Expiscornovus
Super User
Super User

Hi @johnjohn123,

 

For the second chart you should be able to add a percentage column to a collection and use sum to calculate the percentage of the total.

 

ClearCollect(ListOverview, AddColumns(TempListsOverview,"Percentage",Text(Quantity/Sum(TempListsOverview,Quantity)*100,"[$-en-US]0.0%")));

 

1. TempListsOverview collection which already has the number of items per list (in a quantity column)

templistsoverviewcollection.png

 

2. New collection used in a pie chart

listsoverview_example.png

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,645)