Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
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
    147,244 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
    147,244 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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

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

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 298 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 174

#3
stampcoin Profile Picture

stampcoin 138

Overall leaderboard
Loading started