web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Line Chart from ShareP...
Power Apps
Unanswered

Line Chart from SharePoint List

(0) ShareShare
ReportReport
Posted on by 1,265

I have a SharePoint List with the following columns of data.

 

RJF61_0-1715111916010.png

I would like to sum the various columns and then have an app that displays a Line Chart (of the summed values).  I have done some searches but not sure what direction to take.  Any suggestions would be appreciated. 

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @RJF61,

     

    You can create a calculated column in your SP list that returns the sum of your individual number columns. This calculated column can then be used within your line chart as series value.

     

    To create a calculated column, select 'see all column types' when adding a new column.

    LaurensM_1-1715113632446.png

    In the column type overview, select 'Calculated'. The formula will have the following structure: [column name] + [column name]

    LaurensM_2-1715113715611.png

     

     

    When selecting the Line Chart control in your app and navigating to the advanced section of the right property panel, the series 1 should be set to your calculated column (mine is called Total). Labels can be set to the respective label value you would like to display on the Line Chart.

     

    LaurensM_0-1715113437794.png

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • RJF61 Profile Picture
    1,265 on at

    @LaurensM Thanks for the response.  In my scenario, I want to sum the individual columns and then graph those values (i.e., 6073, 755, 1165, etc.)

     

    RJF61_0-1715168886022.png

    RJF61_1-1715169027894.png

    Does that make sense?

     

     

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @RJF61,

     

    Thanks for the clarification! In this case, I expect that we will have to manually sum the individual columns and add the totals to an array. This array can then be displayed based on a specific column order (example 2) or descendingly based on value (example 1 - mimicking your screenshot). Both examples can be seen in the screenshot below. My charts were based on 6 columns, but I have provided 9 column placeholders in my code examples.

     

    LaurensM_1-1715333336361.png

     

    Example 1 - Line Chart displaying the columns descendingly based on value

     

    Adjust the Line Chart Items property to the following code:

     

    With(
     {
     //Fetch list in memory; adjust list name
     wList: ListName
     },
     With(
     {
     wTotalSorted:Sort(
     [
     //Adjust column names
     Sum(wList, Number1),
     Sum(wList, Number2),
     Sum(wList, Number3),
     Sum(wList, Number4),
     Sum(wList, Number5),
     Sum(wList, Number6),
     Sum(wList, Number7),
     Sum(wList, Number8),
     Sum(wList, Number9)
     ],
     //Sort descendingly based on the total Value
     Value,
     SortOrder.Descending
     )
     },
     ForAll(
     Sequence(CountRows(wTotalSorted)),
     //Add a text index column (will serve as label on the line chart)
     {
     Index:Text(Value),
     Total:Index(wTotalSorted,Value).Value
     }
     )
     )
    )

     

    This should result in the following Labels & Series1 values:

    LaurensM_0-1715338079450.png

     

    Example 2 - Line Chart displaying the columns in a predefined order

    In this case we will add a Column Name field which will be used as chart label. The order in which you define the table rows will define the chart order. Adjust the Items property to the following code:

     

    With(
     {
     //Fetch List in memory; adjust list name
     wList: ListName
     },
     [
     //Adjust column and colName parameters accordingly
     {Total:Sum(wList, Number1),ColName:"Number 1"},
     {Total:Sum(wList, Number2),ColName:"Number 2"},
     {Total:Sum(wList, Number3),ColName:"Number 3"},
     {Total:Sum(wList, Number4),ColName:"Number 4"},
     {Total:Sum(wList, Number5),ColName:"Number 5"},
     {Total:Sum(wList, Number6),ColName:"Number 6"},
     {Total:Sum(wList, Number7),ColName:"Number 7"},
     {Total:Sum(wList, Number8),ColName:"Number 8"},
     {Total:Sum(wList, Number9),ColName:"Number 9"}
     ]
    )

     

    The Labels and Series1 properties should look as follows:

    LaurensM_1-1715338357466.png

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard