Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Filter Gallery by date with Dynamic CRM 365



My first post and beginner


I try filter a range from today now()


Sort(Filter(Appointment; And( DateDiff(Now(); scheduledstart) <= 7 ; DateDiff(Now(); scheduledstart) >= 0)); scheduledstart; Ascending)


Sort(Filter(Appointment; DateDiff(Now(); scheduledstart) <= 7 && DateDiff(Now(); scheduledstart) >= 0); scheduledstart; Ascending)


Not work 😞 .. HELP .. later i need filter a range start = now()  at end 7 days to list gallery


I see a code example


Much different datasource... sorry bad english!

Community Support Team
Community Support Team

Re: Filter Gallery by date with Dynamic CRM 365

Hi SandroAlvares,


Do you have any other data source, such as SharePoint list, etc.?

If you have one, please test your code with a different data source to see if it will work.

Besides, what’s the format of “scheduledstart”? Please make sure it has the same format with now().


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Filter Gallery by date with Dynamic CRM 365

Hello yamao,


Sharepoint not include connection Dynamic CRM and Oracle, i need connection Dynamic CRM


Look a format scheduledstart e scheduledend



I try different format is look: 

Translate english: Invalid argument type (Text). Waiting for a Number value, instead.


Try test do add label


DateValue(Text(scheduledstart; "dd/mm/yyyy"))


DateDiff(Now(); DateValue(Text(scheduledstart; "dd/mm/yyyy")))


2 Work are correct... Look



Make test: 


Sort(Filter(Appointment; (DateDiff(Now(); DateValue(Text(scheduledstart; "dd/mm/yyyy"))) <= 7 && DateDiff(Now(); DateValue(Text(scheduledstart; "dd/mm/yyyy"))) >= 0)); scheduledstart; Ascending)


why just label? is Gallery not work... filter much strange! Smiley Sad

Helpful resources


Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,999)