Showing results for 
Search instead for 
Did you mean: 
Post Partisan
Post Partisan

Gallery Item DateDiff

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'  

Super User
Super User

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? 



//compliance is either true or false

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


req 2:

        "Title1" in ThisItem.Text, 
        "Title2" in ThisItem.Text, 
        "Title3" in ThisItem.Text,
        DATEDIFF(Today(),YourDateValue,Days) < 0



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


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

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,086)