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
Hi,
I have now tried lots of things from the answers above but I can´t solve my issues. Maybe I´m thinking totally wrong when I try to do it. An ordinary Subtract is working with just numbers but not when I´m using Param also.
Is Subtract only working in format: HH:MM:SS ?
This is the example that I have tried with bad results.
// 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]]
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
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 Thomaz,
I believe you will need to include the index in your shape data in order to make it work. The structure of the parameter section can be found in DataMiner Docs. For example:
Sum|DMAID/EID:PARAMID:INDEX1|DMAID/EID:PARAMID:INDEX2|...
The drawback of this approach is that you will need to include the index of all the rows from the table in your shape data.
Another approach is using Dashboards. You can create a GQI query that gets data from all tables that are related to a specific connector. From the result you can aggregate based on the desired column to get the total sum of tokens.
Hope it helps.
Hi Miguel,
The sum is working when I use index as you say, but do you know how I can do an subtraction of the parameters?
120501/2735:6453 = 300
120501/2735:6454 = 193
Sum|120501/2735:6453:TL-DD-DEC|120501/2735:6454:TL-DD-DEC|
gives the results of 493
Subtract|120501/2735:6453:TL-DD-DEC|120501/2735:6454:TL-DD-DEC|
gives the results of 300
// Thomaz
This has been further answered here: https://community.dataminer.services/question/subtract-data-in-visio/