How would i get initial from Full Name using DAX

  • How would i get initial from Full Name using DAX

    Posted by DSC Communities on October 31, 2019 at 7:28 am
    • Mohamed Azarudeen

      Member

      October 31, 2019 at 7:28 AM

      Hi,

      How would i get initial from Full Name , For example Jason John , i need to have like this JH
      Please help me in to solve this problem .Thanks in Advance

      Thanks and Regards,
      Azar.

      ——————————
      Mohamed Azarudeen
      BI Developer
      IV
      chennai
      9790777218
      ——————————

    • Audrey Abbey

      Member

      October 31, 2019 at 9:07 AM

      You will have to use a calculated column and some string manipulation functions.
      The challenge is that you may have different patterns in your data.
      String manipulation depends on patterns, so if you have different patterns it can get really messy.

      This will work as long as the pattern is FirstName {space} LastName.

      Initials = LEFT(‘Table'[Column1], 1) & MID(‘Table'[Column1], SEARCH(” “, ‘Table'[Column1])+1, 1)

      It concatenates the first letter of the string, with the first letter found after the space.

      If you have a name pattern like:
      Jason A John, then you would need a different pattern.

      ——————————
      Audrey Abbey
      SR. BI Developer/Analyst
      LeapFrogBI
      Portland OR
      ——————————
      ——————————————-

    • Mohamed Azarudeen

      Member

      October 31, 2019 at 9:22 AM

      Hi Thank you very much for your answer, i am using Direct query Model, Search option didn’t recognize in DAX formula.?

      ——————————
      Mohamed Azarudeen
      BI Developer
      IV
      chennai
      9790777218
      ——————————
      ——————————————-

    • Audrey Abbey

      Member

      October 31, 2019 at 10:07 AM

      Then you will need to make some effort to play around with the string functions in DAX and find something that will work with Direct Query.
      FIND may work, if SEARCH doesn’t, but I have no way of reproducing your environment locally.

      https://docs.microsoft.com/en-us/dax/text-functions-dax

      ——————————
      Audrey Abbey
      SR. BI Developer/Analyst
      LeapFrogBI
      Portland OR
      ——————————
      ——————————————-

    • Mohamed Azarudeen

      Member

      November 1, 2019 at 3:29 AM

      Hi , Thank you very Much .iĀ  will do it.

      Thanks and Regards,
      Azar.?

      ——————————
      Mohamed Azarudeen
      BI Developer
      IV
      chennai
      9790777218
      ——————————
      ——————————————-

    DSC Communities replied 5 years, 10 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘How would i get initial from Full Name using DAX’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!