Yes - as long as the drill path uses fields, rather than calculated dimensions. Use GetCurrentField('drillGroupName') to get the current level of the drill down. Use this in your expression, like this:
=if(GetCurrentField('group') = 'Month', <expression for month>, <expression for other>)
In QV, the editor falsely flags this as an error -- I am not sure if the QS editor has the same flaw.