Skip to main content
Community site session details

Community site session details

Session Id : ir7/7RIpgYA8WK9sxhlGEM
Power Apps - Building Power Apps
Answered

How do I specifically filter data

Like (0) ShareShare
ReportReport
Posted on 15 Feb 2017 11:48:35 by 20

Hello,

 

this is the case; I have 200 unique names in my database (Amber, Angie, Arnold), All of these people have worked on various occasions, so for the whole year there are 1400 names in total in my access database (the names come up several times) but I would only like to see 200 unique names in the first screen of my powerapp, and then when I click Amber I only want to see her worked hours.

 

How can this be built in? thank you in advance.

 

Kind regards,

 

Willem

  • sharewatcher Profile Picture
    20 on 15 Feb 2017 at 16:00:55
    Re: How do I specifically filter data

    Thank you meneghino i will work further on this!

  • Verified answer
    Meneghino Profile Picture
    6,949 on 15 Feb 2017 at 14:24:32
    Re: How do I specifically filter data

    Then please use the GroupBy function.  Something like this for the items of Gallery1:

    GrouBy(EmployeeNames, "EmployeeFirstName", "AllItems")

    Then you can use somethig like this for the last date:

    Max(AllItems, Date)

    Anyway, much explanation here

     

    When you click and go the next screen, just set the Items of your gallery to:

    Gallery1.Selected.AllItems

    This will give you the best performance

     

  • sharewatcher Profile Picture
    20 on 15 Feb 2017 at 13:42:14
    Re: How do I specifically filter data

    thank you for the information,

     

    This works well in shortening the list and making it able to open within the limit of 500 lines.

     

    But how can we add the latest worked day from Amber to the first screen (so for example we can see only Amber in the first screen but we also would like to see her last day that she worked);

    Amber | 29-12-2016 | 8 hours worked
    Angie  | 28-12-2016 | 6 hours worked

    and then whenever you click on the name Amber, it goes to the next screen outlining all the hours worked per day (so here you can see;

    EmployeeFirstName |  Date            | WorkedHours

    Amber                       |  29-12-2016 | 8 hours worked 
    Amber                       | 26-12-2016  | 5 hours worked
    Amber                       | 22-11-2016   | 8 hours worked

    Amber                       | 21-11-2016   | 8 hours worked

    The name of the columns are above the text.

    Thank you in advance.

  • Meneghino Profile Picture
    6,949 on 15 Feb 2017 at 13:06:15
    Re: How do I specifically filter data

    The function that does what you need is Distinct. However this function is not yet delegated so applying it directly to the SharePoint source will yield a list of the unique names in the first 500 records of your 1400.  You can see the result with this;

    Distinct(EmployeeNames, EmployeeFirstName)

    Since you have relatively few records, then a solution could be to cache all 1400 records in memory (i.e. using a collection) and then using the collection in the above formula.

     

    Please see my comment to this post for an idea of how to do that efficiently.

     

    This will have the added advantage that whenever you use that table anywhere else in the app, performance will be very very fast.

  • sharewatcher Profile Picture
    20 on 15 Feb 2017 at 12:37:07
    Re: How do I specifically filter data

    Hello Meneghino,

     

    The name of the table is EmployeeNames and the name of the column, which is Text, is EmployeeFirstName.

     

    Thank you in  advance.

  • Meneghino Profile Picture
    6,949 on 15 Feb 2017 at 12:00:39
    Re: How do I specifically filter data

    Hi @sharewatcher your issue is very clear and yes it can be built in, but the possible solutions depend on some details.

    What type of column is it?  Lookup or text?

    If you give the name of the table and column it will be easier to refer it in the proposed solution.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete