You can format grid members depending on their level position in the cube structure.

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:

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

This method doesn’t currently support parent-child dimensions because members’ unique names don't include the level name.