Use attribute in rule

I would like to send fill the measure prior year for all balance sheet accounts from total prior year.
Therefore i build up in my account dimension an attribute called balancesheet and filled it with B for balance sheet account and G for p&l accounts.
How can i now use the attribute information in a rule so, that only the B accounts are filtered?