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

## Formula for ratio calculation

Hi Mates,

I have two labels named as A and B then I want to display ratio in C label as 100% if  A/B = 0/0.

I can able to get the value of label_C  if A/B <> 0/0 with below formula

Round((Value(Label1_76.Text)/(Label1_91.Text))*100,1 )& "%"

1 ACCEPTED SOLUTION

Accepted Solutions
Level 10

## Re: Formula for ratio calculation

Can you please try the code below:

If(
Round(
Value(Label1_76.Text) / Value(Label1_91.Text) * 100,
1
) <= 0,
100 & "%",
Round(
Value(Label1_76.Text) / Value(Label1_91.Text) * 100,
1
) & "%"
)

----------------------------------------------------------------------------
Thanks,
K-A-R-L

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

Level 10

## Re: Formula for ratio calculation

Can you please try the code below:

If(
Round(
Value(Label1_76.Text) / Value(Label1_91.Text) * 100,
1
) <= 0,
100 & "%",
Round(
Value(Label1_76.Text) / Value(Label1_91.Text) * 100,
1
) & "%"
)

----------------------------------------------------------------------------
Thanks,
K-A-R-L

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

Announcements

#### Power Apps Community User Group Member Badge

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

#### Power Platform World Tour

Find out where you can attend!

#### Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

#### 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 (3,743)