Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Filter by Date not working

(1) ShareShare
ReportReport
Posted on by 71
Hi Hoping I could get some help
 
My filter on my sharepoint list is returning blank table.

In Summary I am trying to have it always return the current year as the dynamic value, but then all items within the month of January
 
The Code: 
 
With(
    {
        StartDateJan: Date(
            Year(Today()),
            Month(1),
            Day(1)
        ),
        EndDateJan: Date(
            Year(Today()),
            Month(1),
            Day(31)
        )
    },
    ClearCollect(
        PackagesJanNewChartvar,
        Filter(
            'Alldeliveredvar',
            Created >= StartDateJan,
            Created <= EndDateJan
        )
    )
)

The SP List
 
  • Verified answer
    Sirbatchu Profile Picture
    Sirbatchu 71 on at
    Filter by Date not working
    Hi All
     
    Firstly, massive apology, I believe you are all correct, the formula I believe does indeed work, the issue is actually the old delegation issue.
     
    I have 2000+ records, and powerapps was set to only grab 500, I believe to combat this, as I am only wanting to fetch the current years records, I could do something that includes "Last" or, look at scrubbing the sharepoint list a bit to reduce the amount of records present.

    Regards
     
    Matt
  • DBO_DV Profile Picture
    DBO_DV 4,415 on at
    Filter by Date not working
     
    I've just got another idea. Maybe it is a Formating problem. 
    Just add the Datasoruce in a gallery and put 'Created' in a Textlabel.
    Sometimes it doesn't work as expected when you compare DD/MM/YYYY with MM/DD/YYYY. Could you check if the date frome SharePoint and The variable are the same? 
     

    If this solved your problem, please mark it as Solved to help others find the solution faster.
    If you found it helpful, consider giving it a Like to support each other in this community!

    Thanks, and happy building!

  • timl Profile Picture
    timl 33,713 on at
    Filter by Date not working
    I would have thought that @DBO_DV's suggestion would work.
     
    Could you confirm what 'Alldeliveredvar' is? Judging by the name, is a variable rather than the actual SharePoint list?
     
  • Sirbatchu Profile Picture
    Sirbatchu 71 on at
    Filter by Date not working
    Hi DBO DV, thanks for the post.
     
    Unfortunately, this did not make any difference, still a blank table.
  • Suggested answer
    DBO_DV Profile Picture
    DBO_DV 4,415 on at
    Filter by Date not working
    Hey,
     
    could you try to change it like this:
    With(
        {
            StartDateJan: Date(
                Year(Today()),
                1,
                1
            ),
            EndDateJan: Date(
                Year(Today()),
                1,
                31
            )
        },....
      Either this or you need to enter a complete Date into Month() and Day(). 
     

    If this solved your problem, please mark it as Solved to help others find the solution faster.
    If you found it helpful, consider giving it a Like to support each other in this community!

    Thanks, and happy building!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard