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 💪!
I want to use the same solution, but I need to fileter the statuses: Completed, Pending, Backlogged.
I really hope you can help 🙂
AddColumns(
GroupBy(
'All Projects',
"Status",
"GROUPDATA"
),
"totalQuantity",
Sum(
GROUPDATA,
ID
)
)
I tried something like this:
AddColumns(
GroupBy(
'All Projects',
Filter("Status"=Pending),
"GROUPDATA"
),
"totalQuantity",
Sum(
GROUPDATA,
ID
)
)
)
User | Count |
---|---|
263 | |
110 | |
98 | |
55 | |
40 |