Hi,
Is there any way that I can get a sum from one column in a table with an other column?
As example: We having licenses for Dolby Digital in one licensing element there we have 300 tokens and used 107 tokens and then we have another element with 300 tokens and used 88 tokens. Can I then get the sum of these tokens?
I know it works with single parameter with ParameterSummary: Sum|120501/3975:308|120501/3975:311|
But not when I´m trying to get data from a table.
// Thomaz
The solution to this consists of 2 nested placeholders. From inside to outside:
- Param placeholder: When passing a column parameter in the param placeholder without specifying an index, the resulting value will be all of the column values, separated by '|' characters.
- Sum placeholder: The sum placeholders takes any amount of ',' separated values and gives the sum of all of them.
Let's say your element is called "eleA" and your column parameter has ID 10, then what you want is
- [param:eleA,10]
- Nest it in [sum:[sep:,|]<result>]. We need the sep placeholder here because the output of the param placeholder is separated by '|' and the sum expects ','.
- The eventual result of both nested in each other is then [sum:[sep:,|][param:eleA,10]]
You are missing a comma between your 2 values. The subtract placeholder expects something like [subtract:200,100]. In your case it would look like [subtract:200 100] which would not work. Just add a comma in between your 2 param placeholders and you should be good to go.
Hi Toon,
I have tried and tried but I´m stucked with the sum.
I have Remain tokens: Remaining Tokens is: [Param:120501/2735,6454,TL-DD-ENC] and Total of tokens: Total of Tokens is: [Param:120501/2735,6453,TL-DD-ENC]. These placeholders showing correct data, but how can I subtract the results from these placeholders?
I have tried like this but it is not correct:
[Subtract:[Param:120501/2735,6454,TL-DD-ENC] [Param:120501/2735,6453,TL-DD-ENC]]
// Thomaz