Attributes in business rules

does anybody have a working example of using attribute values in a business rule. The scenario is the following, I have an accounts -dimension with P&L and Balance accounts and I need to calculate roll-ups differently depending on the type of account used. This means that I have an attribute called account_code, which details the type of account used (eg. "p" for P&L and "b" for Balance) and I need to leverage this in a business rule. There is a good working example of semi-additive behavior in this post jedox.com/community/palo-forum…ht=semi-additive#post6714 .

If you have any working example of a syntax where you use attributes in business (enterprise) rules, then I would greatly appreciate it if you could post it here. Or, if you know of another post detailing the same problem please refer me to that thread.

...thanks for these answers. The remaining issue I have is, on this setup, I have to enter a business rule for each balance account separately. This is due to the fact that the target area is "static". So, for instance, if I have a business rule that states:
['balance'] = C: IF(AND(PALO.ELEVEL("db", "time", !'time') > 0, PALO.DATA("db", "#_account", "acccode", !'account') == "B"), PALO.DATA("db", "cube", PALO.ECHILD("Tuotekehitys", "time", !'time', PALO.ECHILDCOUNT("db", "time", !'time')), !'account', !'msr'), STET())

Where the account is named balance and another rule for the next account let's say active: