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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show Legend Column Chart
Power Apps
Answered

Show Legend Column Chart

(2) ShareShare
ReportReport
Posted on by 205
Hi Everyone,
 
I have a SharePoint list with a column as below.
SharePoint list name: ListA
Column name: Qty
I have values ​​in the column Qty as 10; 20; 30; 40 ;50
I created a column chart from the sharepoint list with the Qty choice column.
It's showing as well now.
But I'm facing an issue with Legend display.
It only show a value, I want to show all value 10; 20; 30; 40 ;50 in Legend of the Column Chart.
Could you please help me the code?
 
ColumnChart.SeriesLabels is not working for me.
 
Many thanks.
ROSE
Categories:
I have the same question (0)
  • Verified answer
    AndrewR1 Profile Picture
    1,572 Moderator on at

    Since you are working with a SharePoint list and a Column Chart, the issue likely arises because SharePoint stores Choice column values differently. The legend might only be showing one value instead of all unique values.

    Solution Approach

    You need to explicitly define the Legend values by setting Items of the chart properly and ensuring that the data is grouped correctly.


    Steps to Fix the Legend Display Issue

    1. Ensure Your SharePoint Data is Correctly Structured

      • If Qty is a Choice column, SharePoint stores it as a table rather than a plain number.
      • Instead of ThisItem.Qty, you may need to extract the .Value like:
        ThisItem.Qty.Value
    2. Use the GroupBy Function to Aggregate Data

      • If your Qty values are stored as choices, group them properly using:
        ClearCollect(
        colChartData,
        AddColumns(
        GroupBy(
        ListA,
        "Qty",
        "GroupedData"
        ),
        "Count",
        CountRows(GroupedData)
        )
        )
    3. Bind the Chart to the Collection

      • Set the Items property of the Column Chart to:
        colChartData
    4. Configure the X-Axis and Y-Axis

      • X-Axis: Qty
      • Y-Axis: Count
    5. Ensure Legends Display Correctly

      • If ColumnChart.SeriesLabels is not working, manually define the Legends using:
        ColumnChart.Legends = Distinct(ListA, Qty.Value)
      • OR if stored as text, use:
        ColumnChart.Legends = Distinct(ListA, Qty)

    Final Expected Result

    • The column chart should now show Qty values (10, 20, 30, 40, 50) as separate bars.
    • The legend should display all values correctly.
    • The chart should properly group duplicate values.
     
    Please click Accept as the Answer 

    If my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it a Like 👍

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard