Given a data object such as an SL account number, department number, sub-account number, etc. for which you want to create a concatenated list of values in a single range of values for another data object, such as a list of accounts for a department, departments in a division, sub-accounts for an account, etc.
Create a measure variable that will determine the last value for the range. In this case, the value will be the department number and name on the account. Select New from the Variables drop-down menu.
=Last([SL Acct6 No]) In ([Dept No + Name (display)])>
Create a dimension variable for the previous values.
=If(Not(IsNull(Previous(Self;([Dept No + Name (display)]))));Previous(Self;([Dept No + Name (display)])) + ";") + [SL Acct6 No]
Create a detail variable for the full concatenated list of values associated with the variable on which you are grouping the list (for example, the department number and name).
=[VAR Concat Acct 6 v2] Where ([SL Acct6 No]=[VAR Last Acct 6 v2])