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 / Galley with pie charts
Power Apps
Unanswered

Galley with pie charts

(0) ShareShare
ReportReport
Posted on by 14

Hi!

 

I'm trying to build a gallery with pie charts inside, screenshot below:

 

2019-07-08_10-40-40 - Apps.jpg

But the legends for the second and thrird items are not correct and i don't know why because the first one seems perfect.
Anyone can help me with this?

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @msequeira94 ,

    Could you please share a bit more about the data structure of your 'DEMAND-DM' data source?

     

    Based on the formula that you provided within the Items property of the Gallery control, I think there is something issue with it.

     

    According to the formula you provided, I do not find any syntax error with it. Actually, this issue is related to the Pie Chart control you embedded within your Gallery control.

    When you add a Pie Chart control within your Gallery, you could only set the Labels property and Series property to specific column value in your Table, you could not dynamically set the Labels property and Series property of the Pie Chart control to column value in your Table.

    E.G. When you set the Labels property of the Pie Chart control to "ReviewersList" and set the Series property to "Numero" column, then all Pie Charts in your Gallery would show "ReviewersList" and "Numero" value as your first Pie Chart. For your second Pie Chart and third Pie Chart, it would not dynamically select "ProjType" or "Category" column as Labels property.

     

    As an fixed solution, please consider take a try with the following workaround (Use a same column within your Table as the Labels property of your Pie Chart control😞

    Set the Items property of the your Gallery to following formula:

    [
     AddColumns(
     GroupBy(
     'DEMAND-DM',
     "ReviewersList",
     "Group"
     ),
     "LabelColumn", /* <-- Add this new column, then set the Labels property of your Pie Chart control to this column */
     "ReviewersList",
     "Number",
     CountRows(Group)
     ),
     AddColumns(
     GroupBy(
     'DEMAND-DM',
     "ProjType",
     "Group"
     ),
     "LabelColumn",
     "ProjType",
     "Number",
     CountRows(Group)
     ),
     AddColumns(
     GroupBy(
     'DEMAND-DM',
     "Category",
     "Group"
     ),
     "LabelColumn",
     "Category",
     "Number",
     CountRows(Group)
     )
    ]

    Then within your Gallery, set the Items property of the Pie Chart control to following:

    ThisItem.Value

    set the Labels property of the Pie Chart to following:

    ThisItem.LabelColumn

    set the Series proeprty of the Pie Chart to following:

    ThisItem.Number

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • msequeira94 Profile Picture
    14 on at

    Hello @v-xida-msft ,

     

    Thank you in advanced for your response.

    I tried your solution and this was the outcome:

     2019-07-09_09-29-50.jpg

     

    Not quite there. Here a sample of the data set (DEMAND-DM):

    2019-07-09_09-35-25.jpg

     

    Regards.

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @msequeira94 ,

    Based on the issue that you mentioned, I think you have some misunderstanding with formula I provided above.

     

    On your side, please consider modify your formula as below:

    Set the Items property of the your Gallery to following formula:

    [
     AddColumns(
     GroupBy(
     'DEMAND-DM',
     "ReviewersList",
     "Group"
     ),
     "LabelColumn", /* <-- Add this new column, then set the Labels property of your Pie Chart control to this column */
     ReviewersList, /* <-- Modify here. Type ReviewersList column here rather than "ReviewersList" */
     "Number",
     CountRows(Group)
     ),
     AddColumns(
     GroupBy(
     'DEMAND-DM',
     "ProjType",
     "Group"
     ),
     "LabelColumn",
      ProjType, /* <-- Modify here. Type ProjType column here rather than "ProjType" */
     "Number",
     CountRows(Group)
     ),
     AddColumns(
     GroupBy(
     'DEMAND-DM',
     "Category",
     "Group"
     ),
     "LabelColumn",
     Category, /* <-- Modify here. Type Category column here rather than "Category" */
     "Number",
     CountRows(Group)
     )
    ]

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • msequeira94 Profile Picture
    14 on at

    It's working perfectly! Thank you @v-xida-msft !

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard