cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

the values being compared have mismatched type

Hi All, I have created a Gallery and loaded the data from excel as table format The data is Table1 and layout has three values Body as AvailableHrs, Subtitle3 as Month and Title4 as Year and it is coming fine as expected. I have created a Texbox and using the below formula to populate hrs based on the current month but the values compared have mismatched type (Left is text and right is number) but the same formula is working fine in another apps Text(LookUp(Table1,Month=(Month(Now())),AvailableHrs)) But i have use the below formula then it is working fine. Please help Text(LookUp(Table1,Month="2",AvailableHrs))

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: the values being compared have mismatched type

Hi @subramanian

 

To fix a type mismatch error, you can use the Value function to convert a string to a number, or the Text function to convert a number to a string.

 

Here's an example of how you would use these functions:

 

 

Text(LookUp(Table1,Value(Month)=(Month(Now())),AvailableHrs)) 

or...

 

Text(LookUp(Table1,Month=Text(Month(Now())),AvailableHrs)) 

 

 

 

 

View solution in original post

5 REPLIES 5
Super User
Super User

Re: the values being compared have mismatched type

Hi @subramanian

 

To fix a type mismatch error, you can use the Value function to convert a string to a number, or the Text function to convert a number to a string.

 

Here's an example of how you would use these functions:

 

 

Text(LookUp(Table1,Value(Month)=(Month(Now())),AvailableHrs)) 

or...

 

Text(LookUp(Table1,Month=Text(Month(Now())),AvailableHrs)) 

 

 

 

 

View solution in original post

Highlighted
Frequent Visitor

Re: the values being compared have mismatched type

thanks. It working

Highlighted
Helper I
Helper I

Re: the values being compared have mismatched type

HI,

 

I have the same problem here but mine is slightly different.   I get the same message but I don't know how I would apply the value or text function .  The dtat a in this form is based off a sharepoint list.   

 

 Filter Function.jpg

 

 

Highlighted
Super User
Super User

Re: the values being compared have mismatched type

Hi @Fbelay

 

Supposing that SubmissionStatusCount is a text column in SharePoint, I'd try the following formula....

 

Filter('ID Theft Tracking', "SubmissionStatusCount" = "1")
Highlighted
Helper I
Helper I

Re: the values being compared have mismatched type

Thanks for replying.  The blue notification goes away but it won't filter my data.   In the sharepoint list, I made sure the column "SubmissionStatusCount" was a text field instead of a number.  

 

I am not really understanding why the filter, sort, or sortbycolumns will not work.   Its weird.   I just want to filter my gallery to only show specific data. 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free 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 (6,386)