Hi again,
Ill try again to see if someone could help me with this because I´m totally stucke. I had already an question about this issue with lots of answers but they are not working in my case so I try again. This is the old question: https://community.dataminer.services/questions/edit/?id=107088&__nonce=bd0ea84469
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
Hi,
I have them separated and the results from the parameter is correct.
[Param:120501/2735,6453,TL-DD-ENC] = 180
[Param:120501/2735,6454,TL-DD-ENC] = 101
Then I will subtract 6454 from 6453 and get the results and that is not working.
I have also now tried the sum that Jarno proposal and that was working.
[Sum:[Param:120501/2735,6453,TL-DD-ENC], -[Param:120501/2735,6454,TL-DD-ENC]]
So for me so is the sum working but not subtract
Thanks for your help
Hi Thomaz,
Nice to meet you!
From my experience (and also from the DM Docs [Subtract:...]), I think the placeholder is only to be used with date-time and timespan. I'd let it up to the software team to either confirm or deny this statement.
I would suggest using the [Sum:X,Y,Z] placeholder. You can simply add a minus (-) sign before your param placeholder.
Example: [Sum:[param:123/45,67], -[param:123/45,89]]
Kind Regards,
Jarno
Subtract should work perfectly fine with numbers FYI.
Hi Jarno,
Thanks for your help and the sum example you mentioned was working perfect.
Do you know how I now can get the sum of the results that I has got?
I want to have these results into a sum of all 3.
[Sum:[Param:120501/2735,6453,TL-DD-DEC], -[Param:120501/2735,6454,TL-DD-DEC]]
– (Sub)
[Sum:[Param:120501/3877,6453,TL-DD-DEC], -[Param:120501/3877,6454,TL-DD-DEC]]
– (Sub)
[Sum:[Param:120501/2742,6453,TL-DD-DEC], -[Param:120501/2742,6454,TL-DD-DEC]]
= (Sum)
Br,
Thomaz
This can be achieved by nesting these in a sum placeholder again:
[Sum:[Sum:[Param:120501/2735,6453,TL-DD-DEC], -[Param:120501/2735,6454,TL-DD-DEC]],[Sum:[Param:120501/3877,6453,TL-DD-DEC], -[Param:120501/3877,6454,TL-DD-DEC]], [Sum:[Param:120501/2742,6453,TL-DD-DEC], -[Param:120501/2742,6454,TL-DD-DEC]]]
The subtract placeholder was not yet working with numbers. Support for this has been added in 10.3.8 with RN36636. Thanks for using the community Thomaz!
The best way to debug these kinds of issues is always to work from the inside to the outside. Put your param placeholders separately in a shape text and check the result. Are the numbers what you expect them to be? What if you subtract the results statically? Only then can we look to combine and/or think whether this is a software issue or not. Hope that helps.