none
DAX equivalent of Text to Column? RRS feed

  • Question

  • Hi Folks 

    I want to split a column in a powerpivot table based on  the location of a dash. I have a column called service name that contains  data  in the format outlined below and in the linked screenshot

    e.g.

    Service Name 

    7554501130 - Tony Smith

    7124505130 - David Little

    Some times the service Name is blank. I want to split the the persons name from the  Numeric component of Service Name out so that in the above example I would get 

     

    Persons Name

    Tony Smith 

    David Little 

     

    If there is no name in a particular row that is fine, I just need to avoid any Error being returned. So basically the equivalent of a Text to column in Excel based on the character "-")

    Any advice would be appreciated.

    Thanks 

    Steve 

     

     

     

     

    Monday, July 25, 2011 10:33 PM

Answers

  • Hi Folks 

    I want to split a column in a powerpivot table based on  the location of a dash. I have a column called service name that contains  data  in the format outlined below and in the linked screenshot

    e.g.

    Service Name 

    7554501130 - Tony Smith

    7124505130 - David Little

    Some times the service Name is blank. I want to split the the persons name from the  Numeric component of Service Name out so that in the above example I would get 

     

    Persons Name

    Tony Smith 

    David Little 

     

    If there is no name in a particular row that is fine, I just need to avoid any Error being returned. So basically the equivalent of a Text to column in Excel based on the character "-")

    Any advice would be appreciated.

    Thanks 

    Steve 

     

     

     

     


    Use a calculated column wit this formula:

    =MID([service name],FIND("-",[service name])+2,255)

    Regards,

    David Hager

    Monday, July 25, 2011 11:33 PM

All replies

  • Hi Folks 

    I want to split a column in a powerpivot table based on  the location of a dash. I have a column called service name that contains  data  in the format outlined below and in the linked screenshot

    e.g.

    Service Name 

    7554501130 - Tony Smith

    7124505130 - David Little

    Some times the service Name is blank. I want to split the the persons name from the  Numeric component of Service Name out so that in the above example I would get 

     

    Persons Name

    Tony Smith 

    David Little 

     

    If there is no name in a particular row that is fine, I just need to avoid any Error being returned. So basically the equivalent of a Text to column in Excel based on the character "-")

    Any advice would be appreciated.

    Thanks 

    Steve 

     

     

     

     


    Use a calculated column wit this formula:

    =MID([service name],FIND("-",[service name])+2,255)

    Regards,

    David Hager

    Monday, July 25, 2011 11:33 PM
  • Somehow, I still get an error. why do you add 2,255?

    Monday, October 3, 2016 5:32 PM