Hi!
I'm trying to build a gallery with pie charts inside, screenshot below:
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?
Solved! Go to Solution.
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,
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,
Hello @v-xida-msft ,
Thank you in advanced for your response.
I tried your solution and this was the outcome:
Not quite there. Here a sample of the data set (DEMAND-DM):
Regards.
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,
Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
Did you miss the call?? Check out the Power Apps Community Call here!
User | Count |
---|---|
253 | |
203 | |
75 | |
37 | |
33 |
User | Count |
---|---|
330 | |
214 | |
123 | |
71 | |
54 |