cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Hi Everyone,

Can anyone tell me how to solve this? I'm calling a table from database to display in power-apps table below is my formula and provided attachments. 

Sort(Filter('[dbo].[RequestTrail]', Active = 1 && DateValue(Text(TransactionDate),"en") >= DateValue(Text(AuditTrailFromDatePicker1.SelectedDate))
&& DateValue(Text(TransactionDate),"en") <= DateValue(Text(AuditTrailToDatePicker1_1.SelectedDate)) ),SequenceNo, Ascending)

Thank you so much.

 

 



2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Hi @Big_S 
 
Can you confirm that your Active field in the db table is a Number field? I replicated the formula in my app and it seems like the date filter works just fine. 
 
Thanks,

View solution in original post

Highlighted
Dual Super User III
Dual Super User III

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

@Big_S 

 

What is the type of Active field in you sharepoint list, can you please confirm? 
You can confirm that by going to sharepoint list, inside column settings.
If it is Yes/No field, then you need to send data in the form of boolean i.e. true/false
MicrosoftTeams-image (60).png

Hope this Helps!

View solution in original post

10 REPLIES 10
Highlighted
Dual Super User III
Dual Super User III

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Hi @Big_S 
 
Can you confirm that your Active field in the db table is a Number field? I replicated the formula in my app and it seems like the date filter works just fine. 
 
Thanks,

View solution in original post

Highlighted
Helper V
Helper V

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

I also try another table the formula works fine, I'll check the active and update you Thank you so muchhhh ❤️

Highlighted
Helper V
Helper V

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Yes!! you're right its a number? do I need to convert it to text? how to do it?

Highlighted
Dual Super User III
Dual Super User III

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Hi @Big_S , 

 

You don't have to convert that, the number comparison works fine with the filter command.

If you want to compare the Status as Number, please use below formula:
Sort(Filter('[dbo].[RequestTrail]', Value(Active) = 1 && DateValue(Text(TransactionDate),"en") >= DateValue(Text(AuditTrailFromDatePicker1.SelectedDate))
&& DateValue(Text(TransactionDate),"en") <= DateValue(Text(AuditTrailToDatePicker1_1.SelectedDate)) ),SequenceNo, Ascending)

 

If you want to do a string comparison:
Sort(Filter('[dbo].[RequestTrail]', Text(Active) = "1" && DateValue(Text(TransactionDate),"en") >= DateValue(Text(AuditTrailFromDatePicker1.SelectedDate))
&& DateValue(Text(TransactionDate),"en") <= DateValue(Text(AuditTrailToDatePicker1_1.SelectedDate)) ),SequenceNo, Ascending)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Helper V
Helper V

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Hi @yashag2255 

 

I tried the first formula i got this error, below I used gallery to view the data for checking database connection only.
The second formula no error but no display

s1.png

Highlighted
Dual Super User III
Dual Super User III

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Hi @Big_S 
 
From what I see as per your screenshot, your Status field is not of type Integer, it holds values, request and approved, but here in the formula, you are comparing it with a number.
 
Conversion to integer failed because "Request" and "Aproved" can not be converted to type interger.
 
While, conversion to string getting no records, because there is no such entry where status is one.
 
Hope this Helps!
Highlighted
Helper V
Helper V

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

hi @yashag2255 

 

I think the Active is not an integer am i right?

s2.png

Highlighted
Dual Super User III
Dual Super User III

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

@Big_S 

 

What is the type of Active field in you sharepoint list, can you please confirm? 
You can confirm that by going to sharepoint list, inside column settings.
If it is Yes/No field, then you need to send data in the form of boolean i.e. true/false
MicrosoftTeams-image (60).png

Hope this Helps!

View solution in original post

Highlighted
Helper V
Helper V

Re: Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Hi @yashag2255 

 

Active is bit data type


s3.PNG

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,462)