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

Internet Explorer calculates differently

Hey Guys, 

I am using a Round function : 
Round( (ThisItem.Progress1 + ThisItem.Progress2 + ThisItem.Progress3 + ThisItem.Progress4) / ThisItem.NumberOfStand) *100 , 0) 

In the example the numbers are: (0.75 + 0.5 + 0.6 / 3 ) * 100

In the Interpet Explorer it calculates the following overall progress:

BildPRoblem_IE.PNG

 

But the Chrome Brwoser calculates it correctly with: 62% 

 

BildPRoblem%.PNG

 

Can I somehow tell PowerApps to seperate the function for different Browsers?

1 ACCEPTED SOLUTION

Accepted Solutions
sarahKukis
Level: Powered On

Re: Internet Explorer calculates differently

Your first answer was almost correct, I just needed to use the value funktion for the NumberOfStand as well.
So this worked:

 

ound(
  (
    Value(ThisItem.Progress1, "en-US") +
    Value(ThisItem.Progress2, "en-US") + 
    Value(ThisItem.Progress3, "en-US") + 
    Value(ThisItem.Progress4, "en-US")) / Value(ThisItem.NumberOfStand, "en-US") * 100,
  0)

 

View solution in original post

4 REPLIES 4
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Internet Explorer calculates differently

What are the types of the values 'Progress1', 'Progress2', 'Progress3' and 'Progress4'? If they are of type text, then PowerApps will try to convert them to numbers based on the rules of the current locale prior to adding them up. Chrome and IE have different ways of determining the current locale (Chrome is based on one of its settings, IE is based on the OS's language settings), which could explain the difference.

If the values are indeed text, and you know that its decimal separator is the '.', you can indicate to the expression the locale that you want to use the conversion using the Value function:

Round(
  (
    Value(ThisItem.Progress1, "en-US") +
    Value(ThisItem.Progress2, "en-US") + 
    Value(ThisItem.Progress3, "en-US") + 
    Value(ThisItem.Progress4, "en-US")) / ThisItem.NumberOfStand * 100,
  0)

Hope this helps!

sarahKukis
Level: Powered On

Re: Internet Explorer calculates differently

Thank you @CarlosFigueira

unfortunaltely its not the solution. If I change it to your code the progress in IE is : 0.

The Progress1-4 are columns in a sharepoint list which are calculated with numbers from different columns and formatted to percentage in the sharepoint list.

Community Support Team
Community Support Team

Re: Internet Explorer calculates differently

Hi @sarahKukis ,

I've made a similar test in IE and not met the same problem like your description.

Here's my test:

set the label's Text:

Round((0.75 + 0.5 + 0.6)/3*100,0)

And the label display "62".

So the caoculation and Rond function in IE has no problem.

I think the problem is your column's Value.

Could you make sure that :ThisItem.Progress1,ThisItem.Progress2,ThisItem.Progress3,ThisItem.Progress4 and ThisItem.NumberOfStand display as "0.75 ,0.5 , 0.6, 3" in IE?

Since they are calculated fields and formatted to percentage, so it may has some problems in displaying.

Please check this. If they do not display as "0.75 ,0.5 , 0.6, 3", I suggest you transfer them before calculating.

I've found some has met the similar issue, he used this to transfer:

Concatenate(Text(Round(Value(ThisItem.CompletionScore)*100,0),"[$-en-US]0"),"%")

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Show-a-percentage-from-Sharepoint-li...

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sarahKukis
Level: Powered On

Re: Internet Explorer calculates differently

Your first answer was almost correct, I just needed to use the value funktion for the NumberOfStand as well.
So this worked:

 

ound(
  (
    Value(ThisItem.Progress1, "en-US") +
    Value(ThisItem.Progress2, "en-US") + 
    Value(ThisItem.Progress3, "en-US") + 
    Value(ThisItem.Progress4, "en-US")) / Value(ThisItem.NumberOfStand, "en-US") * 100,
  0)

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,730)