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 / How to Filter Values w...
Power Apps
Unanswered

How to Filter Values with Current Date from a Lookup List value

(0) ShareShare
ReportReport
Posted on by 18

Hello!

 

I am currently building a PowerApps form that uses two lists, one is Ticket Requests the other is Events. 

I am trying to have the dropdown filter out any dates that are older than the current date (we do not delete old events). The current working formula is: Choices([@'Ticket Requests'].Event). This does not filter out all the old events, it will show everything in the other list (Events).

I've tried to use the below to filter out the old events in the dropdown but I receive the error; Invalid argument type and invalid number of arguments: received 1, expected 2-3. 

 

Sort(
Filter (
'Ticket Requests'.Event, Event >= Now()
)
)

 

Can someone provide me with some guidance as to how I should continue?

Categories:
  • madlad Profile Picture
    2,637 Moderator on at

    For the Invalid number of arguments error, try adding the column name(Event) to the Sort(). 

    For the invalid type, I'm not 100% sure, does it say anything else with that error?

  • patty6 Profile Picture
    18 on at

    I've attached a screenshot of the errors I am getting. 

    Also the column is called Event, I've also attached a screenshot of the column. 

    2023-07-10 12_22_10-Window.png
    2023-07-10 12_19_38-Window.png
  • madlad Profile Picture
    2,637 Moderator on at

    What's the rest of the Invalid argument type error say? I can only see the start of it in the screenshot, knowing what it wants and what it's getting is crucial to solving it. For the meantime, try something like:

     

    Sort(
     Filter(
     'Ticket Requests', 
     Event >= Now()
     ),
    "Event"
    )

     

  • patty6 Profile Picture
    18 on at

    Error is stating: 

    Invalid argument type. Expecting one of the following: Number, Decimal, Date, Time, DateTime, UntypedObject.

     

    After I added your suggestion, I received another error: 

    Delegation warning. The "filter" part of this formula might not work correctly on large data sets. The data source might not be able to process the formula and might return an incomplete data set. Your application might not return correct results or behave correctly if the data set is incomplete. 

  • madlad Profile Picture
    2,637 Moderator on at

    Ahh I see. Your Event column is "lookup" type, as shown in the image you sent. This type is not comparable to a datetime value(such as Now()) using the >= operator. Does the event column have a field of a date type? If so, try comparing this to Now(), something like: Event.EventDateValue >= Now()

     

    As for the delegation error, you shouldn't have to worry about this unless you have more than 500 items. More delegation info here

  • patty6 Profile Picture
    18 on at

    Even with that I am getting the same errors. The look up value is needed, as we are pulling the events from another list. Do you recommend going another way about this? 

  • madlad Profile Picture
    2,637 Moderator on at

    Unfortunately I haven't used lookup columns in powerapps much, and I don't know what exactly your Events table looks like, so I don't know the exact syntax you need here.

    It looks like this post had a similar issue, maybe their solution could point you in the right direction? 

  • patty6 Profile Picture
    18 on at

    The post did help a bit, I was able to modify it without using the lookup value and just reference the specific columns from the two lists. 

     

    I've removed the Sort for now, I do have less errors but it looks like its still expecting a Text value. 

     

    Filter(
    'Ticket Requests'.Event, 'Crypto Events'.Date >= Now()
    )

     

  • madlad Profile Picture
    2,637 Moderator on at

    Now I'm not certain, but it's possible that 'Crypto Events'.Date is returning a text field. You can use DateTimeValue('Crypto Events'.Date) to convert this to a datetime value, and maybe then it works? If it doesn't, what part is highlighted with the error?

     

  • madlad Profile Picture
    2,637 Moderator on at

    Now I'm not certain, but it's possible that 'Crypto Events'.Date is returning a text field. You can use DateTimeValue('Crypto Events'.Date) to convert this to a datetime value, and maybe then it works? If it doesn't, what part is highlighted with the error?

     

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard