Replies: 4 comments
-
Oops, a problem in the title. Calculation on a DataSetRow |
Beta Was this translation helpful? Give feedback.
-
Your formula doesn't make any sense. It's best to use the "Aggregation quick tool" (the Sigma/Sum symbol in the palette) and drag and drop into a table header or table footer row or into a group header or group footer row. That way, the correct level is pre-selected, e.g. in a table footer row it will aggregate a column for the whole table, whereas in a group footer row, it will use the corresponding group as level. In the aggregation dialog, it is very important to define a useful name to the binding, because one cannot change it later. Say, you created two aggregate bindings and named them "minEtal" and "maxEtal". Now you see that your formula doesn't make sense, because the maximum of these two value will always be the maxEtal value. But let's say you want to compute the difference maxEtal - minEtal, which makes more sense. One possible way to do this is: Drag a "Data Item" into the footer row.
If you don't need to output maxEtal and minEtal, you can delete them from the footer row, the bindings (with the aggregation) will not be deleted. It's good to know that if you drag and drop an aggregation or data item from the palette (or use the insert context menu in the layout to do the same), this actually creates two things:
|
Beta Was this translation helpful? Give feedback.
-
Addition: In SQL, note the difference between the group functions MIN and MAX and the functions LEAST and GREATEST. |
Beta Was this translation helpful? Give feedback.
-
Great, your response was so fast and so efficient : that's work ! In fact the rigth calculation is : Math.max(row["maxEtalon_Ecm1"],-row["minEtalon_Ecm1"]) Thank's a lot ! |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
Sorry but I'm starting with BIRT.
In a table, I'd like to make this calculation on a column : MAX( MAX(dataSetRow["Etal"]), MIN(dataSetRow["Etal"]));
and write the result in the table's footer.
I tried to do the calculation in a script in "onRender" of the table, store the result in params and displayed this param in a Data cell in the footer.
The problem is the maximum is always the first value of the dataSetRow.
How do you proceed for this "simple" calculation ?
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions