cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wolfrat
Regular Visitor

Calculation in a GalleryItem Label returns wrong results. (ThisItem.Fieldx * 100)

Hey Everybody - strange behavior found in a Label Calculation.

 

I import data from an excel File. The values are floating point values.

 

When I calculate the Values as shown below, I get strange results:

 

0 * 100 results 0 

1 * 100 results 100 

0.5 * 100 results 500 

0.75 * 100 results 7500 

Bildschirmfoto 2022-06-01 um 10.04.24.png

 

Does anyone know the problem and how to solve it? Thanks a lot.

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@wolfrat 

The most likely problem is that the data type of your Fortshritt column in Excel is text, rather than floating point.

I guess you're running Power Apps in a non English locale (German?), so Power Apps is recongising 0.5 as 5, and 0.75 as 75.

If this is the case, the following should provide a more accurate result.

Value(ThisItem.Fortshritt, "en") * 100

If you're running the Power Apps Studio in German, you'll need to replace the , with a ;

 

Value(ThisItem.Fortshritt; "en") * 100

 

 

View solution in original post

2 REPLIES 2
timl
Super User
Super User

@wolfrat 

The most likely problem is that the data type of your Fortshritt column in Excel is text, rather than floating point.

I guess you're running Power Apps in a non English locale (German?), so Power Apps is recongising 0.5 as 5, and 0.75 as 75.

If this is the case, the following should provide a more accurate result.

Value(ThisItem.Fortshritt, "en") * 100

If you're running the Power Apps Studio in German, you'll need to replace the , with a ;

 

Value(ThisItem.Fortshritt; "en") * 100

 

 

This was it, timl. Thank you so much for a quick solution.

 

kind regards from the alps.

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,371)