Table calculation for calculated field

Dear QS-Community,

it seems to me that we currently can not use “add table calculation” function for calculated fields.

sumIf(
AmountLECurr *
ifelse(
LegalEntityID = ‘21’, 0.4,
LegalEntityID = ‘42’, 0.38,
LegalEntityID = ‘54’, 0.45,
LegalEntityID = ‘810’, 0.4,
LegalEntityID = ‘541’, 0.4,
0
),
CostItemID = ‘210’
)

Do no need to consider something or is it not possible?

Thank you
Dan

Hi @de.schmidd,

The issue is probably because of your use of the sumIf calculation. If you just return the value in an ifelse statement, it should still function the way you want and be useable in a table calculation. Try something like this:

ifelse(
CostItemID = ‘210’,
AmountLECurr *
ifelse(
LegalEntityID = ‘21’, 0.4,
LegalEntityID = ‘42’, 0.38,
LegalEntityID = ‘54’, 0.45,
LegalEntityID = ‘810’, 0.4,
LegalEntityID = ‘541’, 0.4,
0
),
NULL
)

SumIf will return a ‘custom aggregation’ therefore, QS will not allow a different aggregation to be completed. But if you utilize something like the above, it allows table aggregations to be added.

1 Like