Closed stratosn closed 1 year ago
I don't agree with removing the clause "attrcalc" (it is not a function) since I agree that the same results can be obtained with calc + role attribute, attrcalc is safer (you will not override identifiers by mistake when calculating attributes) and much more clear. Typical use: would add attribute calculation with the attrcalc clause after any dataset manipulation (on identifiers and measures).
Identifiers cannot be overridden by definition (see RM 1885 at page 54) therefore we may leave a single syntax that adds a identifier/measure/attribute or redefine a measure/attribute.
You are right, @capacma. But when I said "overrides" I meant "overlaps", not "overwrites", i.e. refers by mistake to an id instead of an attribute, which would originate, at least, an error. On the other hand, I see the clause "attrcalc" shorter and much more clear than "calc role attribute" in terms of code simplicity. Anyway, not a big issue if you decide to remove it, but for me this is the type of "redundancy" that, far from causing problems, makes life easier (users' life, in this case)
Footnote in page 97 of the UM: "The calc can be used both for Measures and for Attributes and is a unary Operator, e.g. it may operate on Components of just one Data Set to obtain new Measures / Attributes, while the attrcalc is dedicated to the calculation of the Attributes in the N-ary case" So it seems that "Calc ROLE Attribute" <> "attrCalc"
OK we need reconciliation of the Um and RM descriptions. There is another proposal to unify the clause operators (described at page 228) with the join expression clauses (described at page 137). However using the syntax proposed in #249 you can use a single syntax to calculate measures or attributes on one or more datasets.
Refers to an old version of documentation. Some residual references have been removed in the current live version.
Issue Description
The attrcalc() function does not seem to have any functionality that the calc() function is not already able to perform just as well - so I do not see why it is needed at all. See also #249
Proposed Solution
Remove attrcalc()