Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Name initials

Hello,

The data fields are “item #”,“sales manager”, “date” and “sales”. For example

item #

sales manager

date

sales

3

Dan Ban

1

10

3

Dan Ban

2

20

4

Dan Ban

2

30

5

Moly Demoly

1

40

I need to create a straight table with the sales manager’s initials instead of their full name. For example:

item # (dimension)

sales manager (expression)

sales (expression)

3

DB

30

4

DB

30

5

MD

40

I want to do it on the expression level, without changing the script, by using string functions. The data file contains numerous items, names and dates, but every item is associated with only one sales manager.


Any ideas?

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If the initials are always capitalized in the full name you can try something like:

    keepchar([sales manager],'ABCDEFGHIJKLMNOPQRSTUVWXYZ')


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

If the initials are always capitalized in the full name you can try something like:

    keepchar([sales manager],'ABCDEFGHIJKLMNOPQRSTUVWXYZ')


talk is cheap, supply exceeds demand
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Create a Field in load script like

Load

     Left(SubString([sales manager], ' ', 1), 1) & Left(SubString([sales manager], ' ', 2), 1) AS [sales manager initial],

.....

Not applicable
Author

nice! works perfectly.

angelaecheverri
Creator
Creator

how a Sales Name could be one, two or tree or more words you can first make a Capitalize Stament

KeepChar(Capitalize([sales manager]),'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

marthacano01
Partner - Creator
Partner - Creator

Thanks you!! very helpful  

rbecher
MVP
MVP

Nice but be aware of initialising Mac, Mc and O' surnames:

Wikipedia:Reference desk/Archives/Language/2011 September 7 - Wikipedia, the free encyclopedia

Astrato.io Head of R&D