Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert a String into a Num

I'm new into this.

I have the following formula on a Color property of a Label:

<If(Price.Text>= 1000, Red , Gray)>

<Price.Text> returns a String, so logically it doesn't evaluate.

Obvious questions is, how to convert that into a Number.

I tried <Price.Value> but i believe it doesn't work with labels.


Many thanks.

Not applicable

Ok got it. Now I need to understand it... I got a bit confused about what happened.


Not applicable

Why is that on the Color Property I need to refer to the Price without <ThisItem>:

If(     Price>1000; Red;Gray)

and on the text property I need to use ThisItem:

ThisItem.Price & " €"


Price should mean the same in both places, since Text and Color are both properties of the same label...




If(Value(ItemPriceLable.Text) > 256,RGBA(150, 256, 150, 1),RGBA(256, 150, 150, 1))



Not applicable

Sorry, but I'm not getting there, just with the images...

are you storing your prices in a "List" or "Excel".

Not applicable


I'm guesing you

First setup your spreadsheet with a table (I recommend naming your Table)


after making your spreadsheet load it and the table into powerapps


make a gallery and add price label to gallery and price to label then add the script I mentioned earlier to the label.


Not applicable

That has been done since the beginning(my data is formatted as a table, and is named, that's not the issue here). I was hopping you could explain your latest PrtSc's. I still don't see what you mean with them. Although I must thank you for all the work you're having to answer me.


Helpful resources

User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (51,275)