Crosstab scripting calculated total

Angelika13
edited February 11, 2022 in Analytics #1

Hello everybody,

I am very new to Birt and working with Version 4.4.1.
I am trying do a aggregation depending on a group (Typ)
The column Calc should be calculated as follows:

If (Type I and Type II != "")
Calc = Typ I - Type II
else
Calc = Type III

(I 've tried to use Grand Totals in the ColumnArea but found no way to first filter for the group(Typ) and then do the calculation)

the raw data for datacube and crosstab is:

thank you very much
greetings, Angelika

Answers

  • Custom totals can be a bit difficult with crosstabs. The easiest way I've found to accomplish what you're looking for, is if you conditionally assign K2 to be negatives. Then you can just do a normal sum of all three types.

    Warning No formatter is installed for the format ipb