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
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
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

Highlighted
donnadonut
Level: Powered On

Re: Filtering Total Count of 1 column

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

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,892)