@Lisea123
The formula already accounted for that.
With({_val:Left(Upper('EventSiteCode-TotalContact'.Text),2)},
If(StartsWith(_val, "P"), Left(_val, 1), _val)
)
In general it reads like this:
First, get the first 2 characters of the EventSiteCode-TotalContact (we only ever care about 2 characters).
Then if the result (_val) starts with "P", then return just the first character, otherwise return the 2 characters.
So, unless I am completely misunderstanding what you are saying, the provided formula should be giving you what you want.