IF Clause
Results 1 to 3 of 3

Thread: IF Clause
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    May 2018
    Posts
    63
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default IF Clause

    Hello everyone,

    I have the following tabel:

    Dep Area
    A A1
    A A2
    A A3
    A A4
    A A5
    A A15
    A A16
    A A20
    A A21


    Now I am Looking for a function for an calculated column (Power Pivot), which categorize the Area in the following groups
    A1-A5 = AA
    A15-A16 = AB
    A20-30 = AC
    A90-A100 = AD

    How would you manage that?
    A simple IF-Clause?


    Best Regards
    Joshua

  2. #2
    MrExcel MVP
    Join Date
    Dec 2014
    Location
    Sydney, Australia
    Posts
    1,180
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: IF Clause

    If you can’t change it at the source, then a calc column is fine. Try SWITCH as follows

    =SWITCH(TRUE(),
    table[column] in {“”A1,”A2”,”A3”,”A4”,”A5”}, “AA”,
    table[column] in {“”A15,”A16”}, “Ab”,
    etc
    )
    Matt Allington is a professional Power BI Consultant, Power BI Trainer and Microsoft MVP based in Sydney Australia. Matt is author of the Power BI book Supercharge Power BI and the Power Pivot Book Supercharge Excel.
    What is Power BI?

  3. #3
    Board Regular
    Join Date
    May 2018
    Posts
    63
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: IF Clause

    It works perfecly! Thanks

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •