You can format grid members depending on their level position in the cube structure.
Create level formatting
This can be done through the Anaplan XL right-click menu or by writing the relevant lines in the format sheet, as shown:

The result in the grid:

Syntax
You can specify formats for subtotals using the syntax LEVEL:SUBTOTAL.

Parent child dimensions
This method doesn't currently support parent-child dimensions as the member's unique names don't contain the level name.