Forum Discussion

CharnanK's avatar
CharnanK
Helper I
2 years ago
Solved

New Column

I need to create a column in a table, based on another column data.  

New Column: Business Unit

If LV Sector = North Coast Sector &/or Southern Sector - I want the new column to Show Regional operations

Please help!!!

  • Hi CharnanK 

     

    Please create the following column
    BU =IF(
              OR(
                     'Table'[LV Sector] = "North Coast Sector" , 'Table'[LV Sector] = "Southern Sector"),
              "Regional Operations",
               "-"
             )

     

    If my post helps please give kudos and accept it as a solution!
    Thanks

7 Replies

  • CharnanK , Try a new column like

     

    Business Unit =
    IF(
    'Table'[LV Sector] = "North Coast Sector" || 'Table'[LV Sector] = "Southern Sector",
    "Regional Operations",
    BLANK()
    )

     

     

    If this does not help
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • Uzi2019's avatar
    Uzi2019
    Community Champion

    Hi CharnanK 

     

    Please create the following column
    BU =IF(
              OR(
                     'Table'[LV Sector] = "North Coast Sector" , 'Table'[LV Sector] = "Southern Sector"),
              "Regional Operations",
               "-"
             )

     

    If my post helps please give kudos and accept it as a solution!
    Thanks

    • CharnanK's avatar
      CharnanK
      Helper I

      Clicking on Custom Column, and the box doesn't allow me to do the 'IF' Function
      I want this: 

      to have another column where

      Southern Sector = Regional Operations

      Metro SW Sydney = Metropolitan Operations 

      etc.......

    • CharnanK's avatar
      CharnanK
      Helper I

      OKay so that worked.  I have 10 names that I want to turn into 5 in another column - is that too long for the DAX? Doesn't seem to want to work out after 2

       

      • Uzi2019's avatar
        Uzi2019
        Community Champion

        Hi CharnanK 

        Please take calculated column either click on 3 dots on right side of table name you will get these options

         

        Or Under modelling tab you will get New column

         


        Please share the condition you want to implement.  I will write correct DAX
        If should work if there is 10 condition but you cant take OR(). 
        OR() allows only 2 expression.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi CharnanK ,

    Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.