cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
donnadonut
Level: Powered On

Filtering Total Count of 1 column

Hi guys,

 

So i have been asked to create an app for the headcount of our company and unfortunatly i am limited on how it should look and be used. I have created a sharepoint list for each department and i have managed to get the edit screen to work perfectly, it's exactly how they want it to look.

They now want a gallery that shows the total number of direct employees and the total number of indirect employees for each department. I cannot figure this out.

My sharepoint list (names and titles edited out for confidentiality)

manufacturing.PNG

My edit screen which they want to be the default layout for each department / full summary

editscreen.PNG

 

This would be how they want the summary to look - So they want to keep the same layout but have the direct and indirect total number of fields populated for Current Headcount, apr, may etc
Direct Indirect.PNG

 

Does this make sense? Is it possible? Sorry for my lack of knowledge here! Hoping someone can help!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Filtering Total Count of 1 column

@donnadonut 

If I understand you correctly, you are creating a Summary screen that will only show direct and indirect from your data source.

Unlike the first screen which shows the individual names of people and the counts, this summary screen is only based on the Direct and Indirect totals.

The only confusion I have is that you refer to this as an Edit screen...are you implying this is not a Gallery and that you are using something else, or is it just a generic name?

If the above is correct, then you will need to do some grouping.

For your Gallery Items, you will make the formula similar to this:

GroupBy(yourDataSourceName, "Direct & Indirect", "Items")

Obviously replacing the yourDataSourceName with the actual name of your data source and the Direct & Indirect with the recognized column name for that in PowerApps.

This will create a table for the gallery that will have two columns, the Direct & Indirect column and the Items column.  The Direct and Indirect column will be a distinct list of the Direct and Indirect value.  The Items column will contain a table of all the rows that match that value.

 

Now, in your Gallery, for each textbox you have, you can simply use the following formula:

Sum(ThisItem.Items, Apr)

This can be done for each column you have in the list and for each textbox you have.

That will give you the sums you are looking for.

 

I hope this is clear and helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Filtering Total Count of 1 column

@donnadonut 

If I understand you correctly, you are creating a Summary screen that will only show direct and indirect from your data source.

Unlike the first screen which shows the individual names of people and the counts, this summary screen is only based on the Direct and Indirect totals.

The only confusion I have is that you refer to this as an Edit screen...are you implying this is not a Gallery and that you are using something else, or is it just a generic name?

If the above is correct, then you will need to do some grouping.

For your Gallery Items, you will make the formula similar to this:

GroupBy(yourDataSourceName, "Direct & Indirect", "Items")

Obviously replacing the yourDataSourceName with the actual name of your data source and the Direct & Indirect with the recognized column name for that in PowerApps.

This will create a table for the gallery that will have two columns, the Direct & Indirect column and the Items column.  The Direct and Indirect column will be a distinct list of the Direct and Indirect value.  The Items column will contain a table of all the rows that match that value.

 

Now, in your Gallery, for each textbox you have, you can simply use the following formula:

Sum(ThisItem.Items, Apr)

This can be done for each column you have in the list and for each textbox you have.

That will give you the sums you are looking for.

 

I hope this is clear and helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

donnadonut
Level: Powered On

Re: Filtering Total Count of 1 column

@RandyHayes  - this is perfect! Thank you so so so much!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 139 members 3,150 guests
Please welcome our newest community members: