cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ShaikSayyad
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 )& "%"

 

Please help me to get C label as 100% if  A/B = 0/0.

 

Thanks in Advance.

1 ACCEPTED SOLUTION

Accepted Solutions
K-A-R-L
Level 10

Re: Formula for ratio calculation

Hi @ShaikSayyad ,

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.

View solution in original post

1 REPLY 1
K-A-R-L
Level 10

Re: Formula for ratio calculation

Hi @ShaikSayyad ,

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.

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 Kudoed Authors (Last 30 Days)
Users online (3,743)