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

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Power Apps Pie Chart not showing SharePoint expense categories correctly

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I’m trying to build a pie chart in Power Apps that shows how my company’s expenses are split across different categories.

My sharepoint list:

1. Category (choice column)

2. Amount (currency column)

 

What i tried:

ClearCollect(
    colExpensesSummary,
    ForAll(
        Distinct(Expenses, Category.Value),
        {
            Category: Result,
            TotalAmount: Sum(Filter(Expenses, Category.Value = Result), Amount)
        }
    )
)
 

Pie chart Items = colExpensesSummary

Label= Category

Series= TotalAmount

Problem:  The chart doesn’t display and I get errors like Name isn’t valid / Result not recognized.

What’s the simplest way to summarize expenses by category and show them in a pie chart?

Thanks!


 

 
I have the same question (0)
  • Kushal_M Profile Picture
    35 on at
    Power Apps Pie Chart not showing SharePoint expense categories correctly
     
    The error is because of how Choice columns behave in Power Apps. A Choice field isn’t just a plain text value, it’s a record with a .Value property. When you use Distinct(), it returns a column called Result, but you’re mixing Category.Value and Result in ways that don’t work it seems.
     
    I have an other alternative - Instead of using Distinct + ForAll, you can directly GroupBy the category and then AddColumns to get totals:
    ClearCollect(
        colExpensesSummary,
        AddColumns(
            GroupBy(
                Expenses, //your SharePoint list.
                "Category", //the column you want to group by.
                "GroupedData" //the name you choose for the sub-table column that will hold all the rows belonging to each category.
            ),
            "TotalAmount",
            Sum(GroupedData, Amount), //goes inside each sub-table and adds up the Amount
            "CategoryLabel",
            Category.Value
        )
    );
     
    As you already configured the Pie Chart with the below parameters
    Items → colExpensesSummary
    Labels → CategoryLabel
    Series → TotalAmount
     
    Glad I could help! If this solved your problem, please mark it as accepted, and don’t forget to hit "Like" if you found it useful.
  • developerAJ Profile Picture
    3,001 on at
    Power Apps Pie Chart not showing SharePoint expense categories correctly
    Use Value instead of Result
     
    ClearCollect(
        colExpensesSummary,
        ForAll(
            Distinct(Expenses, Category.Value),
            {
                Category: Value,
                TotalAmount: Sum(Filter(Expenses, Category.Value = Value), Amount)
            }
        )
    )
     

    If this solution helped you resolve your issue, kindly mark it as accepted — it makes it easier for others to find and also closes the discussion. If you found it useful, a Like ❤️ would be greatly appreciated!

    🤝 Let’s connect on LinkedIn || 📘 Explore more on my articles

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 973 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 366 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 343

Last 30 days Overall leaderboard