Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

filtering latest data from excel into gallery

can somebody please help: i am developing a covid-19 tracker app for my company. I have a table in which data is entered. in some circumstances, one single employee has been sent home on different occasions, each one of these occasions we mark as a "case".


employee: zach west. went home with a fever on 6/29/2020 and again on 10/1/2020. each date marks a different case. each case requires a series of testing. ("initial test", and possibly 3 follow up tests depending on the results.)


when test results are given, the user will search the employee and update with results BUT for the specific case. (Zach went home on 6/29 and 10/1 but we want to update 10/1's case). I have a combobox filtering to a gallery which i want to show the latest or ALL dates for the initial testing


this is the table (titled cases) it reads from (filtered):



in my gallery: i have text labels to pull test dates. formula is:

Text(ThisItem.'Initial Test Date'+1, "[$-en-US]mm/dd/yyyy")


 gallery filtered formula: Filter(cases, 'Employee ID' = update_empID_3.Selected.Employee) 

the combobox is: update_empID_3 


if you look at the table i need it to pull the LATEST record for his testing so they can see his testing history.




Super User III
Super User III

Hi @corina 

If you just want your gallery to display the single last record that was created for the user, you can sort your items in date descending order and call the first function to return the first record.

The formula you would use would look like this:

       SortByColumns(Filter(cases, 'Employee ID' = update_empID_3.Selected.Employee) ,
                     'Initial Test Date',

Super User II
Super User II

Hi @corina,

From my understanding the gallery under "testing history" should show All the employee records based on your formula:

Filter(cases, 'Employee ID' = update_empID_3.Selected.Employee) 

I'm not quite sure why your gallery has only one record.

If you want that the gallery to have only one record and this one to be the last (newest) record of a specific employee is guess this formula will give you the desired result:

Last(Sort(Filter(cases, 'Employee ID' = update_empID_3.Selected.Employee),'Last Date Worked',Ascending))

Can you tell me why do you used "+1" ?

Text(ThisItem.'Initial Test Date'+1, "[$-en-US]mm/dd/yyyy")


Hope it helps !

Helpful resources

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,089)