Hi,
I would like to create a Pie Chart, that can
However, the Pie Chart shows a lot of pies even they are the same department
Anybody can help?
Thanks in advance
Sam
Solved! Go to Solution.
Hi @samsam ,
Do you want to group up the "department" column in your SQL Table and then sum up all "quantity" value within individual department?
Based on the needs that you mentioned, I think the GroupBy fuunction and AddColumns function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:
Set the Items property of the Pie Chart control to following:
AddColumns(
GroupBy('[dbo].[LeaveApplication]', "department", "GroupData"),
"totalQuantity",
Sum(GroupData, quantity)
)
Set the Labels property to department, set the Series property to totalQuantity.
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hi @samsam ,
Do you want to group up the "department" column in your SQL Table and then sum up all "quantity" value within individual department?
Based on the needs that you mentioned, I think the GroupBy fuunction and AddColumns function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:
Set the Items property of the Pie Chart control to following:
AddColumns(
GroupBy('[dbo].[LeaveApplication]', "department", "GroupData"),
"totalQuantity",
Sum(GroupData, quantity)
)
Set the Labels property to department, set the Series property to totalQuantity.
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Worked Perfectly...! Thanks.
@v-xida-msft Thanks so much! Have been stuck on this for hours, but solved now 💪!
User | Count |
---|---|
183 | |
123 | |
88 | |
45 | |
42 |
User | Count |
---|---|
251 | |
160 | |
126 | |
78 | |
73 |