cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Krcmjaster
Helper II
Helper II

Calculated table

I am fairly new to power apps and I am struggling with ti as it's not that user friendly how it wants to be.

 

My questions is, can you create a calculated table base on your connection?

I want to add a table with distinct values from a column and then add counts, sums etc?

 

I have added a data table but I can only add fields from my connection.

 

1 ACCEPTED SOLUTION

Accepted Solutions
rebeccas
Community Champion
Community Champion

Sorry for the late reply. I had a busy weekend.

 

There are a few ways you could do it but I like this one. It is grouping it by your "Name" field but adding a column to the Group (collection for group here) that shows the Sum for each Name. See below and let me know if you have any questions on it.

 

Screens OnVisible - 

 

ClearCollect(CollName,

AddColumns(GroupBy(AddColumns(SPList, "SumAmt", TimeSpent), "Name", "GrpByName"), "SumOfAmt", Sum(GrpByName, SumAmt)))

 

Gallery - Items - CollName

 

Label 1 - ThisItem.Name

Label 2 - ThisItem.SumOfAmt

 

View solution in original post

3 REPLIES 3
rebeccas
Community Champion
Community Champion

Short answer yes. I do tons of calculations in mine including Sum, Multiply, divide, percentages and more. 

 

Can you be specific on a calculation you are working on and I can maybe help. 

@rebeccas So I have basically a sharepoint list as such:

Client Name            customer care specialist        time spent (hours)

Client 1                    CCS 1                                       4

Clinet 2                    CCS 1                                       3

Client 3                    CCS 2                                       6

 

And I want to know to how many clients each specialist is assigned to and how many hours they are spending so we can assign  them to new clients and not overload a person:

 

Name           NR. Clients        Time Spent

CCS 1              2                         7

CCS 2              1                         6

rebeccas
Community Champion
Community Champion

Sorry for the late reply. I had a busy weekend.

 

There are a few ways you could do it but I like this one. It is grouping it by your "Name" field but adding a column to the Group (collection for group here) that shows the Sum for each Name. See below and let me know if you have any questions on it.

 

Screens OnVisible - 

 

ClearCollect(CollName,

AddColumns(GroupBy(AddColumns(SPList, "SumAmt", TimeSpent), "Name", "GrpByName"), "SumOfAmt", Sum(GrpByName, SumAmt)))

 

Gallery - Items - CollName

 

Label 1 - ThisItem.Name

Label 2 - ThisItem.SumOfAmt

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,292)