cancel
Showing results for
Did you mean:
Regular Visitor

## How to Create IF Function using calculation from other variable

Hi Guys,

I try to create some basic calculation for some inspection apps.

On the construction building score the simple equation is

Score = If(Dropdown_Safe.Selected.Value="Tidak Memenuhi Persyaratan",0,10) however the else value i want to change with variable like (100/total question applicable)

so let's say total question only applicable is 5 then 1 question score would be worth 20 points

i try to use if function like this :

If(IsBlank(Label19_7.Text) = true, 0, 1) + If(IsBlank(Label19_8.Text) = true, 0, 1) + If(IsBlank(Label19_9.Text) = true, 0, 1) + If(IsBlank(Label19_10.Text) = true, 0, 1) + If(IsBlank(Label19_11.Text) = true, 0, 1) + If(IsBlank(Label19_12.Text) = true, 0, 1) + If(IsBlank(Label19_13.Text) = true, 0, 1) + If(IsBlank(Label19_14.Text) = true, 0, 1) + If(IsBlank(Label19_15.Text) = true, 0, 1) + If(IsBlank(Label19_16.Text) = true, 0, 1)

but i unable to combine this formula to IF function, seeking your guidance on this issue and thanks before!

1 ACCEPTED SOLUTION

Accepted Solutions
Multi Super User

Hey @Ilhamsyah

Once try the below expression:

If(
100 / No of Questions, // Change No of Questions to the actual number of applicable questions
If(
IsBlank(Label19_7.Text), 0, 1
) + If(
IsBlank(Label19_8.Text), 0, 1
) + If(
IsBlank(Label19_9.Text), 0, 1
) + If(
IsBlank(Label19_10.Text), 0, 1
) + If(
IsBlank(Label19_11.Text), 0, 1
) + If(
IsBlank(Label19_12.Text), 0, 1
) + If(
IsBlank(Label19_13.Text), 0, 1
) + If(
IsBlank(Label19_14.Text), 0, 1
) + If(
IsBlank(Label19_15.Text), 0, 1
) + If(
IsBlank(Label19_16.Text), 0, 1
)
)

Let me know if it works.

I hope this helps 🙂

2 REPLIES 2
Multi Super User

Hey @Ilhamsyah

Once try the below expression:

If(
100 / No of Questions, // Change No of Questions to the actual number of applicable questions
If(
IsBlank(Label19_7.Text), 0, 1
) + If(
IsBlank(Label19_8.Text), 0, 1
) + If(
IsBlank(Label19_9.Text), 0, 1
) + If(
IsBlank(Label19_10.Text), 0, 1
) + If(
IsBlank(Label19_11.Text), 0, 1
) + If(
IsBlank(Label19_12.Text), 0, 1
) + If(
IsBlank(Label19_13.Text), 0, 1
) + If(
IsBlank(Label19_14.Text), 0, 1
) + If(
IsBlank(Label19_15.Text), 0, 1
) + If(
IsBlank(Label19_16.Text), 0, 1
)
)

Let me know if it works.

I hope this helps 🙂

Regular Visitor

It's help Sundeep.

Thanks again for the help!

Announcements