Hello All,
I am building a calorie counter app and I am kinda stuck with the If statement. What I am trying to achieve is to calculate the calorie intake according to user preference.
Here is my IF statement.
If(
(GenderCal.Selected.Value = "male" & ActivityLevelCal.SelectedText.Value = "Not Very Active"),
(1.2 * (10 * WeightCal) + (6.25 * HeightCal) - (5*AgeCal) + 5), UpdateContext({DailyCalCount: true})
);
If(
GenderCal.Selected.Value = "male" & ActivityLevelCal.SelectedText.Value = "Active",
(1.55 * (10 * WeightCal) + (6.25 * HeightCal) - (5*AgeCal) + 5), UpdateContext({DailyCalCount: true})
);
If(
GenderCal.Selected.Value = "male" & ActivityLevelCal.SelectedText.Value = "Very Active",
(1.9 * (10 * WeightCal) + (6.25 * HeightCal) - (5*AgeCal) + 5), UpdateContext({DailyCalCount: true})
);
I am getting this error:
Incompatible type. We can't evaluate your formula because the values being compared in the formula aren’t the same type.
The left value is a Boolean type and the right value is a Text type.
I've attached a screenshot for the reference
Could someone please help me with this regard?
Thank you,
Shay
