A measure with 'ByAccount' aggregation function requires exactly one dimension with Type = 'Accounts' with exactly one attribute ...

A measure with 'ByAccount' aggregation function requires exactly one dimension with Type = 'Accounts' with exactly one attribute with Type = 'Account'. In addition, that attribute needs to be marked as parent if the dimension is parent-child.