Forum Discussion

95Bigbluetoy's avatar
95Bigbluetoy
Helper I
6 years ago
Solved

IF Statement help with multiple variables

I have a data set that includes columns for employee names and job titles. I have created an IF statement so that if a job title equals a certain title, it will show with a certain value in my new co...
  • ChrisMendoza's avatar
    ChrisMendoza
    6 years ago

    95Bigbluetoy -

    I started with the dataset below. Because I edited the file it reordered the columns.

    [Value] is a Calculated Column. 

     

    Adding [RateType] is just a suggestion. You can accomplish what you asked (not adding a helper column) by doing:

    Value = 
    SWITCH(
        TRUE(),
        'Table'[Name] = "John Doe" && 'Table'[Title] = "Project Executive", 65,
        'Table'[Name] = "Jane Doe" && 'Table'[Title] = "Project Executive", 45,
        'Table'[Title] = "Project Executive", 50,
        25
    )