Forum Discussion
Anonymous
8 years agoNot applicable
IF formula with multiple conditions in Power Query Editor
I have my Data Sample as shown in the picture I want to create a custom column in Power Query Editor which pulls the weight as per the conditions: All weights should be in Lbs(Pounds) (1 Oz...
- 8 years ago
OK, I tried out a sample formula and this worked:
= if [profilepercent] = .2 and [userid] = 2 then 1 else if [profilepercent] = .3 and [userid] = 2 then 2 else 3
Looks like you are missing an "else" at the end of your statement. So you have:
if then else if then
You need it to be:
if then else if then else
Anonymous
8 years agoNot applicable
Greg_Deckler If I click on Show error it points to the end of the formula
Greg_Deckler
8 years agoCommunity Champion
OK, I tried out a sample formula and this worked:
= if [profilepercent] = .2 and [userid] = 2 then 1 else if [profilepercent] = .3 and [userid] = 2 then 2 else 3
Looks like you are missing an "else" at the end of your statement. So you have:
if then else if then
You need it to be:
if then else if then else