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. 