Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Filter Gallery Based on Calculated Date


I have a Sharepoint list where "Due Date Calculated" is a date field but is calculated based on 2 other columns.


I'm trying to filter a PowerApps gallery based on Due Date Calculated been less than today but it says "Invalid Argument Type Expecting Number, Date, Time, DateTime


Could anyone help


If I have a label as that field it shows as 2022-06-08T07:00:00Z


Many thanks

Super User
Super User

Hi @karldenton 


Power Apps and calculated fields don't play nice sometime, which may be the issue here.


In most cases, if you are using Power Apps, it's best to handle all your calculations and logic inside the app and keep things simple in your datasource.


Would that approach suit your use case?

Helper II
Helper II

Thanks for the reply. Potentially.

Basically we test an item on a date then add a certain number of days to it from a dropdown and the calculated column adds those together.

I can do it in powerapps as long as the back end list shows the calculated date.


Yeah, that shouldn't be an issue.


Your calculation for that date could be set as instantaneous when the nr of days is selected - Just as long as your process for changing and selecting the days concludes with a means (patch or submit form) of submitting that calculated date back to what would then be a standard date/time column in SPO

Helper II
Helper II

Fab I'll give it a go.

Is it possible to do the calculated label based on a date plus a number selected from a dropdown? So the amount of ADDDAYS would be from the dropdown?

Also just had a thought, what about all the data that is current in the SPL as that's what I want to filter the gallery on


Super User
Super User

Yes, say you have Combobox1, which has an Items property '[1,2,3,4]' - i.e. the nr of days you want to add


Your label text would include your DateAdd function and would look like this:


DateAdd(DateYouWanttoAddTo, Combobox1.Selected.Value)


In terms of all the data in your SPL, you can then just filter, based on how you wer trying to originally with your nerw DueDate, date/time column . So if you want to filter by all items where due date is less than today:


Filter(yourlist, DueDate < Today())


Hope this helps

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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