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

Casting string to integer

I am extracing a number from a text string and need to convert it to integer so that I can compare it in a filter. It appears as though @int is the way to go but I am having trouble figuring out how to format. Here is what the filter looks like before it's casted:

 

Filter(dailySales,Mid(Retailer,9,1)=ThisItem.Result))

 

the number being extracted from the Retailer column is bewteen 1 and 6 and thisitem.result is definately a number because I have checked this.

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff AndyPennell
Power Apps Staff

Re: Casting string to integer

Use the Value function to turn a string into a number. (PA makes no distinction betweeen doubles and integers). So if I understand your example:

Filter(dailySales,Value(Mid(Retailer,9.1))=ThisItem.Result))

View solution in original post

2 REPLIES 2
Power Apps Staff AndyPennell
Power Apps Staff

Re: Casting string to integer

Use the Value function to turn a string into a number. (PA makes no distinction betweeen doubles and integers). So if I understand your example:

Filter(dailySales,Value(Mid(Retailer,9.1))=ThisItem.Result))

View solution in original post

Hockeyman9474
Level: Powered On

Re: Casting string to integer

actually figured that out on my own, but yes value worked...thanks

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,256)