cancel
Showing results for
Did you mean:
Level: Powered On

## Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps form

Hi, I have a PowerApps application connected to a Sharepoint list.  One of the data field in the Sharepoint list is a calculated field, which is displaying exactly as I want it in Sharepoint (with the comma as decimal separator, and rounded to one decimal).

My problem is when that datafield is displayed in my PowerApps application, it is displayed as below, with 14 decimal places and, the most problematic for me, with a period instead of a comma as a decimal separator.  Since my PowerApps language setting is [fr-FR], it doesn't appear that I can convert the 4.06250000000000 to a useable number format in order to round it in PowerApps.

Any help will be appreciated.

Regards, Martin

Accepted Solutions
Microsoft Employee

## Re: Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps

It could be. I can run this successfully in Web Studio in english locale:

Try to use the proper separator according to your locale.

Please also note that this is really a workaround for manually handling the formatting on calculated fields.

All Replies
Highlighted
Microsoft Employee

## Re: Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps

Hello @marnik,

Unfortunately calculated fields cannot be treated as regular fields. You will have to use a formula in PowerApps to limit the number of digits after the decimal. Does all your values have at least 2 digits after the decimal? If so then you could use something like this:

First(Split(YourValue, ".")).Result & "." & Left(Last(Split(YourValue, ".")).Result, 2)

or to test:

First(Split("4.065434598", ".")).Result & "." & Left(Last(Split("4.065434598", ".")).Result, 2)

...which will return "4.06"

If needed, you can modify this formula so it handles cases when the value has less than 2 digits after decimal.

I hope this helps.

Level: Powered On

## Re: Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps

Hi , the problem is that in the shown example, the expected value is "4.1" and not "4.0" since I'd need to round up from "4.06" to retain one decimal place.

Thanks.

Microsoft Employee

## Re: Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps

Sure thing. If you need rounding, try the following: Round(Value(First(Split("4.065434598", ".")).Result & "." & Left(Last(Split("4.065434598", ".")).Result, 2)), 1)
Level: Powered On

## Re: Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps

@dinusc Thanks very much, I'll give this a try and report back
Level: Powered On

## Re: Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps

Unfortunately, it does not work.  See attached image.  The "Value" function yields a "0".   Does this have to do with my locale / language settings? Thank you.

Microsoft Employee

## Re: Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps

It could be. I can run this successfully in Web Studio in english locale:

Try to use the proper separator according to your locale.

Please also note that this is really a workaround for manually handling the formatting on calculated fields.

Level: Powered On

## Re: Calculated SharePoint field appearing as text (and with a period instead of comma) in powerapps

Yes! It worked when I used the "," as a decimal separator.  Thank you very much.