Maybe over-complicated, but should work:
Add three hidden columns to your report table:
- The first could be called 'Lettered' or similar, with a formula of:
=If(Upper(Trim(Left({Primary},1)))="P","P","")
- The second could be called 'BeforeDecimal' or similar, with a formula of:
=If(Find(".",Trim(Substitute(Upper({Primary}),"P","")))>0,
Split(Trim(Substitute(Upper({Primary}),"P","")),1,"."),
Trim(Substitute(Upper({Primary}),"P","")))
- The last could be called 'AfterDecimal' or similar, with a formula of:
=If(Find(".",Trim(Substitute(Upper({Primary}),"P","")))>0,
Split(Trim(Substitute(Upper({Primary}),"P","")),2,"."),
"")
Sort first by 'AfterDecimal' ascending, then by 'BeforeDecimal' ascending, and last by 'Lettered' ascending.
*You may have to wrap the split statements in 'Value(<split>)' tags to get it to work correctly.
**The before and after columns should be numeric.