web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter based on a cert...
Power Apps
Answered

Filter based on a certain condition

(0) ShareShare
ReportReport
Posted on by 16

I would like to filter data based on a certain condition as below:

 - get records with latest modified dates by individuals and modified on today records. Example is attached below for reference:

Left table is what I have but would like to get result as in right table.

 

Your help is appreciated, thank you in advanceCapture.JPG

Capture.JPG
Categories:
I have the same question (0)
  • rmishra Profile Picture
    16 on at

    @RandyHayes : Any thoughts?

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @rmishra 

     

    Chevck my video on how to filter date column with respect to a sharepoint list in powerapps

    https://www.youtube.com/watch?v=eCMuXPI1Qok

     

    similar logic can be applied for other data source

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @rmishra 

    Take a look over @RezaDorrani 's video and see if you still have any questions.  You can definitely do what you are looking to do.

  • rmishra Profile Picture
    16 on at

    Thank you for sharing the video - but it is talks about the very basic of filtering with date. But my filtering logic is something different.

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @rmishra 

     

    First sort your data source based on dates 

    then use Distinct function based on name

     

    this will give you the latest names with the latest date

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @rmishra 

    You can also consider using the GroupBy function to get all the associated information in that record.

    AddColumns(GroupBy(SortByColumns(myData, "Date"), "Name", "entries"), "LastEntry", Last(entries))

    This will give you a table that has a Name and entries column as well as a LastEntry column.

    Based on your image of your data, you would have a table that has three rows and a LastEntry that has the exact data you are looking for.

    If you were using this as an Items source for, let's say, a gallery, you could reference ThisItem.LastEntry.Date to get your last entry.

     

    See attached sample app for more detail.

  • rmishra Profile Picture
    16 on at

    @RandyHayes : Thank you for your inputs, but sadly unable to open the .msapp in machine - would you mind sharing me the export of it - .zip version?

     

    I tried to filter as below, but failing to get one record for each individuals based on latest modified date, not sure how to get it; As I have data in excel, I need to use the DateTimeValue function. 

     

    Filter(ParticipantsCollection, IsToday(DateTimeValue(CreatedDate)) = true && First(SortByColumns(ParticipantsCollection, "ModifiedDate")).EmailAddress in Distinct(ParticipantsCollection, EmailAddress))

     

    This gives me only the first record.

    First(SortByColumns(Filter(ParticipantsCollection, IsToday(DateTimeValue(CreatedDate)) = true),"ModifiedDate",Descending))

     

    I think I need be using ForAll or something else..

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @rmishra 

    I'm not entirely sure that the the formula you mentioned is in line with the original request you had since you are trying to utilize the IsToday function. Originally you had wanted the very last entry not just those of the current day.  Clarify if you need different.

     

    Anyway, please try again to open the msapp on your computer.  There is a process that perhaps you are not familiar - 

    1) Download and save the file to your computer

    2) Go into PowerApps studio and either Open an existing App or Create a new App - either is fine

    3) Once that app opens to the designer screen, Go to File->Open.  Then choose Browse Files.  Browse to the file you saved and it will open.  

    This method is much easier than exporting and trying to import into your environment.

    Let me know if you stumble onto any issues.

    Once in, take a look at the formulas in that app for your solution.

  • rmishra Profile Picture
    16 on at

    @RandyHayes : Sorry for not mentioning that due to some issues I do not have PowerApps studios installed in my machine to open it, and so requested yuo to export the package so that I can import and see it.

     

    About my issue - I want to get the latest records based on latest modified date [I was trying some work around for performance related issues, so you could see the IsToday function]

     

    Thank you again! Will wait to get your export package for reference.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @rmishra 

    PowerApps studio is not something you install, it is through your browser.  It is what you are currently using to design PowerApps. There is no installed application for it.

    So, again, once you are in any app, just go to File->Open and Browse to open the file.

    I believe you will see the formula (that I posted before) that you are looking for in action there and will give you the answer you need.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard