Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

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...
  • Greg_Deckler's avatar
    Greg_Deckler
    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