Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
If the initials are always capitalized in the full name you can try something like:
keepchar([sales manager],'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
If the initials are always capitalized in the full name you can try something like:
keepchar([sales manager],'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
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],
.....
nice! works perfectly.
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')
Thanks you!! very helpful
Nice but be aware of initialising Mac, Mc and O' surnames:
Wikipedia:Reference desk/Archives/Language/2011 September 7 - Wikipedia, the free encyclopedia