Max of String (sorted in alphabetical order) in a calculated field

@Andrea - Another approach. You can change the calculation level argument to PRE_AGG for the Rank function. Then you can use the calculated field in your other calculated fields without having the dimension in your field wells.

You can change the partition field in the rank according to your use case. For this example I’m showing the last alphabetical customer’s total sales by region.

c_last_alphabetical

ifelse(1=rank
(
  [{Customer Name} DESC ] 
  ,[Region]
  ,PRE_AGG
),'Yes','No')

c_last_customer_name

ifelse({c_last_alphabetical}='Yes',{Customer Name},NULL)