cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Galley with pie charts

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Galley with pie charts

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Galley with pie charts

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate I
Advocate I

Re: Galley with pie charts

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.

Highlighted
Community Support
Community Support

Re: Galley with pie charts

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Galley with pie charts

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

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,693)