Skip to main content

Notifications

Community site session details

Community site session details

Session Id : eADLb86HLfpvlmHBnHW1Gm
Power Apps - Building Power Apps
Answered

The requested operation is invalid. Server response failed, we cannot apply operator < to types Timezone and Number

Like (0) ShareShare
ReportReport
Posted on 7 Jul 2022 07:15:34 by

Hello

 

I have a Gallery that filters the following from a SQL datasource (the problem occurs in the red highlight):

 

With(
{
wDate:
DateAdd(
Today(),
-14,
Days
)
},
SortByColumns(
Filter(
vw_ITChangeRequests,
Status = "Closed" &&
StatusDateInt < wDate
),
"StatusDateInt",
Descending
)
)

 

However, I get the error "The requested operation is invalid. Server response failed, we cannot apply operator < to types Timezone and Number".  Any suggestions please?

 

Thank you

  • janineb Profile Picture
    on 07 Jul 2022 at 09:28:05
    Re: The requested operation is invalid. Server response failed, we cannot apply operator < to types Timezone and Number

    Thank you will try what you suggested

  • Verified answer
    WarrenBelz Profile Picture
    146,881 Most Valuable Professional on 07 Jul 2022 at 09:12:51
    Re: The requested operation is invalid. Server response failed, we cannot apply operator < to types Timezone and Number

    @janineb ,

    It needs to be a Date field as what you had will simply not work - you are trying to compare a date with it. You may need to remove and reconnect your data source.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • janineb Profile Picture
    on 07 Jul 2022 at 09:09:01
    Re: The requested operation is invalid. Server response failed, we cannot apply operator < to types Timezone and Number

    Maybe to provide a little more info .... I have now changed back to the Date/Time field (StatusDate) - instead of the StatusDateInt (Integer field) .... I think the error has to do with the time that is included in the date but I'm still very new to PowerApps and not sure how to fix this error

  • janineb Profile Picture
    on 07 Jul 2022 at 08:38:59
    Re: The requested operation is invalid. Server response failed, we cannot apply operator < to types Timezone and Number

    Sorry, integer field

  • janineb Profile Picture
    on 07 Jul 2022 at 08:38:14
    Re: The requested operation is invalid. Server response failed, we cannot apply operator < to types Timezone and Number

    Hi Warren, it is an Int field (converted from a "StatusDate" date field)

  • WarrenBelz Profile Picture
    146,881 Most Valuable Professional on 07 Jul 2022 at 08:29:51
    Re: The requested operation is invalid. Server response failed, we cannot apply operator < to types Timezone and Number

    @janineb ,

    What type of field is StatusDateInt ?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 42 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard
Loading started