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 / Gallery Item DateDiff
Power Apps
Unanswered

Gallery Item DateDiff

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I there a way to run a date diff condition on a specifc item in a Gallery and its 'date'.

 

I have a Gallery. I have a Toggle.

 

In the Toggle default I have 

(CountRows(Fitler(Gallery.AllItems, Field1="Noncomplaint"))) =0 &&

(CountRows(Fitler(Gallery.AllItems, StartsWith(GalleryField.Text, "Title1"))) >0 &&

(CountRows(Fitler(Gallery.AllItems, StartsWith(GalleryField.Text, "Title2"))) >0 &&

(CountRows(Fitler(Gallery.AllItems, StartsWith(GalleryField.Text, "Title3"))) >0 - from this point I need the specific date of issue

                                                                                                                              associated with Title3 compared to Today; if date

                                                                                                                              of issue greater than Today Toggle 'true'  

Categories:
  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @Phineas It seems you have two requirements; the toggle and gallery are two controls in the canvas and based on the gallery the toggle needs to be true or false:

    req 1: overall compliance and then

    req 2: which item is causing the noncompliance? 

     

    req1:

    //compliance is either true or false

    CountRows(Filter(YourGallery.AllItems,DateDiff(Today(), YourDateColumn, Days)<0))

     

    req 2:

    If(
     And(
     ThisItem.Field1="Noncompliant", 
     "Title1" in ThisItem.Text, 
     "Title2" in ThisItem.Text, 
     "Title3" in ThisItem.Text,
     DATEDIFF(Today(),YourDateValue,Days) < 0
     )
     ,"Noncompliant"
     ,"Compliant"
    )

     

     

  • Phineas Profile Picture
    5,331 Moderator on at

    Edited Reply:

     

    Thank you.

     

    Let's make sure we are on the same page.

     

    1. The Gallery needs to display ALL records, not just all 'Compliant' or 'Noncompliant'

    2. Gallery MUST contain AT LEAST either

        - Title1 - Title4; and, Title4 can be no more than two years old

          or

        - Title1 - 5; and, Title5 can be no more than two years old

    With you method would I not also need to factor in the difference periodicities of each, yes?

     

    Some Titles are good for 365 days, some 730, some 1095.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard